Do not attempt to render uninstantiated fields
Review Request #7787 — Created Dec. 1, 2015 and submitted
Previously, an error in instantiating a
ReviewRequestField
would
lead to an error being logged, but the field would still be attempted to
be rendered. Since the instantiation failed, the variable would be
uninitialized leading to anUnboundLocalError
.Now, if the field cannot be insantiated, we skip to the next field in
the fieldset.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
Col: 1 E302 expected 2 blank lines, found 1 |
reviewbot | |
You can use logging.exception instead, and skip the exc_info=1. |
chipx86 | |
Swap these. |
chipx86 | |
Missing a period. |
chipx86 | |
No need for parens. |
chipx86 | |
This will fail if the above raises an exception, since result won't be defined. |
chipx86 | |
Can we verify the results of this, in case we ever get another logging call and somehow miss the intended … |
chipx86 | |
'six' imported but unused |
reviewbot |
-
Tool: Pyflakes Processed Files: reviewboard/reviews/templatetags/tests.py reviewboard/reviews/templatetags/reviewtags.py Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/templatetags/tests.py reviewboard/reviews/templatetags/reviewtags.py
-
Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/templatetags/tests.py reviewboard/reviews/templatetags/reviewtags.py Tool: Pyflakes Processed Files: reviewboard/reviews/templatetags/tests.py reviewboard/reviews/templatetags/reviewtags.py