Merge lp:~benji/launchpad/bug-994694 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Benji York |
Approved revision: | no longer in the source branch. |
Merged at revision: | 15215 |
Proposed branch: | lp:~benji/launchpad/bug-994694 |
Merge into: | lp:launchpad |
Diff against target: |
97 lines (+44/-2) 2 files modified
lib/lp/bugs/scripts/bugnotification.py (+1/-1) lib/lp/bugs/scripts/tests/test_bugnotification.py (+43/-1) |
To merge this branch: | bzr merge lp:~benji/launchpad/bug-994694 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Harding (community) | code | Approve | |
Review via email: mp+105090@code.launchpad.net |
Commit message
Make a generator react correctly to being closed before all of its results have been yielded.
Description of the change
Bug 994694 describes some odd output resulting from a generator not
reacting correctly to being closed before yielding all of their values.
This branch fixes that bug.
The fix was simple, add GeneratorExit to the list of exceptions reraised
by get_email_
testing the fix. The comments in the test describe it sufficiently (I
hope), so I won't address that here.
LOC Rationale: The entirety of the LOC increase is in tests.
Tests: The new test can be run with this command:
bin/test -c -t test_early_exit
Removing the GeneratorExit from the try/except in
get_email_
The "make lint" report is clean.
Thanks, didn't even know there was a GeneratorExit exception.