fixed bug variable is_rr_approved referenced b4 assigned
Review Request #7923 — Created Jan. 30, 2016 and discarded
Moved the code inside finally block out, so is_rr_approved is referenced after the whole try/except block.
I did some manual testing on reviews requests that are shipped and not shipped.
The code passes all existing unit tests.
| Description | From | Last Updated |
|---|---|---|
|
This isn't quite the right fix, though it's close. We want to keep this test for AttributeError, since it's handling … |
|
-
-
This isn't quite the right fix, though it's close.
We want to keep this test for
AttributeError, since it's handling the specific case of the server being old and not having theapprovedorapproval_failureattributes.Instead, move the code from the
finallyblock out offinallyso that it runs after the wholetry/exceptblock and before theif is_localcheck. That way any uncaught exceptions from thetrywill just raise up further and be handled by the top-level logger.
-
Also, please see https://www.reviewboard.org/docs/codebase/dev/writing-good-descriptions/ for tips on formatting your summary/description/testing done.
- Summary:
-
variable is_rr_approved referenced b4 assignedfixed bug variable is_rr_approved referenced b4 assigned
- Description:
-
~ removed AttributeError so all exceptions that possibly cause is_rr_approved to be not assigned is handled
~ Moved the code inside finally block out, so is_rr_approved is referenced after the whole try/except block.
- Testing Done:
-
+ I did some manual testing on reviews requests that are shipped and not shipped.
+ + The code passes all existing unit tests.
- Diff:
-
Revision 2 (+3 -3)
-
Tool: Pyflakes Processed Files: rbtools/commands/land.py Tool: PEP8 Style Checker Processed Files: rbtools/commands/land.py
Tool: PEP8 Style Checker Processed Files: rbtools/commands/land.py Tool: Pyflakes Processed Files: rbtools/commands/land.py