Closed
Bug 637007
Opened 15 years ago
Closed 15 years ago
undefined name 'msg' in console
Categories
(Cloud Services :: Server: Account Portal, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: tarek, Assigned: telliott)
Details
Attachments
(2 files)
|
13.87 KB,
patch
|
telliott
:
review+
|
Details | Diff | Splinter Review |
|
690 bytes,
patch
|
Details | Diff | Splinter 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)
| Assignee | ||
Comment 1•15 years ago
|
||
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.
| Assignee | ||
Comment 2•15 years ago
|
||
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+
| Reporter | ||
Comment 3•15 years ago
|
||
(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.
| Assignee | ||
Comment 4•15 years ago
|
||
(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?
| Assignee | ||
Comment 5•15 years ago
|
||
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)
| Reporter | ||
Comment 6•15 years ago
|
||
(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
| Assignee | ||
Comment 7•15 years ago
|
||
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.
| Reporter | ||
Comment 8•15 years ago
|
||
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
| Assignee | ||
Updated•15 years ago
|
Severity: critical → minor
| Reporter | ||
Comment 9•15 years ago
|
||
what's the status on this one ?
| Assignee | ||
Comment 10•15 years ago
|
||
I think the last actual bug part of this got worked around ages ago.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•14 years ago
|
Attachment #516056 -
Flags: review?(tarek)
You need to log in
before you can comment on or make changes to this bug.
Description
•