fixed bug variable is_rr_approved referenced b4 assigned
Review Request #7923 — Created Jan. 30, 2016 and discarded
Information | |
---|---|
xingc | |
RBTools | |
release-0.7.x | |
Reviewers | |
rbtools | |
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 … |
|
-
-
rbtools/commands/land.py (Diff revision 1) 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 theapproved
orapproval_failure
attributes.Instead, move the code from the
finally
block out offinally
so that it runs after the wholetry/except
block and before theif is_local
check. That way any uncaught exceptions from thetry
will 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: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||
Testing Done: |
|
|||||||||
Diff: |
Revision 2 (+3 -3) |

-
Tool: Pyflakes Processed Files: rbtools/commands/land.py Tool: PEP8 Style Checker Processed Files: rbtools/commands/land.py