Closed Bug 637007 Opened 15 years ago Closed 15 years ago

undefined name 'msg' in console

Categories

(Cloud Services :: Server: Account Portal, defect)

x86_64
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tarek, Assigned: telliott)

Details

Attachments

(2 files)

Attached patch Flake8 passSplinter Review
Prior to fix a test (http://hg.mozilla.org/services/account-portal/rev/ac6075a51ba1) I've run Flake8 on the code base. Find attached all the cleanup fixes for review. There's one remaining problem that needs a test+fix in console.py in the forgot() method that will break the app.
Attachment #515340 - Flags: review?(telliott)
There seem to be a ton of changes here, not all of which make sense to me, and I'm not sure what the actual bug is.
Comment on attachment 515340 [details] [diff] [review] Flake8 pass Not thrilled by the ones that are removing the dropped-}, and I'm confused by the one that imports _, since that should be broken in about 50 places. The rest seem fine.
Attachment #515340 - Flags: review?(telliott) → review+
(In reply to comment #2) > Comment on attachment 515340 [details] [diff] [review] > Flake8 pass > > Not thrilled by the ones that are removing the dropped-}, yeah -- that could be changed in flake8 > and I'm confused by > the one that imports _, since that should be broken in about 50 places. The > rest seem fine. The magic behind gettext.install() that injects _ in the builtins, is not see by the Flake8 script which inspect the AST. This import is not hurting and fixes the warnings. We could improve this by ignoring warnings related to _ undefined names. Pushed in http://hg.mozilla.org/services/account-portal/rev/880244b4189f The last remaining issue is now the undefined name.
(In reply to comment #3) > The magic behind gettext.install() that injects _ in the builtins, is not see > by the Flake8 script which inspect the AST. This import is not hurting and > fixes the warnings. We could improve this by ignoring warnings related to _ > undefined names. > Right. My question is - if it's complaining about this in console.py, why isn't it also complaining about it in sync.py?
I see the issue. We had a stray error left over from when the ap was sending the email. It just needs pulling. I would expect the backend to be logging details of a failure, so we just need something informational here to alert folks that there might be a problem. This level of code has no idea why.
Attachment #516056 - Flags: review?(tarek)
(In reply to comment #4) > (In reply to comment #3) > > > The magic behind gettext.install() that injects _ in the builtins, is not see > > by the Flake8 script which inspect the AST. This import is not hurting and > > fixes the warnings. We could improve this by ignoring warnings related to _ > > undefined names. > > > > Right. My question is - if it's complaining about this in console.py, why isn't > it also complaining about it in sync.py? If you don't see them, that might be related to the limited size of warnings in flake8. The stack of warnings for each kind of warnings is limited. If you fix just console.py, you should see them in sync.py then. That's yet another thing I need to fix in flake8
Ah, ok. You'd sort of implied that this was the definitive list of fixes. That would be a tremendously useful enhancement in flake8. It's really annoying to make all the fixes in a file, then discover another one was being masked because the same class of error was in another file.
Comment on attachment 516056 [details] [diff] [review] removes the old message Since this was not making any test fail, we need to add with the fix a test that exercise this password_reset1 screen. This can be done by patching temporarily generate_reset_code in the test so it returns False
Severity: critical → minor
what's the status on this one ?
I think the last actual bug part of this got worked around ages ago.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Attachment #516056 - Flags: review?(tarek)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: