Merge lp:~gocept/landscape-client/raise-error-on-signal into lp:~landscape/landscape-client/trunk
Proposed by
Steffen Allner
Status: | Merged |
---|---|
Approved by: | Eric Snow |
Approved revision: | 999 |
Merged at revision: | 1001 |
Proposed branch: | lp:~gocept/landscape-client/raise-error-on-signal |
Merge into: | lp:~landscape/landscape-client/trunk |
Diff against target: |
84 lines (+33/-3) 3 files modified
landscape/lib/tests/test_twisted_util.py (+24/-0) landscape/lib/twisted_util.py (+7/-1) landscape/manager/tests/test_aptsources.py (+2/-2) |
To merge this branch: | bzr merge lp:~gocept/landscape-client/raise-error-on-signal |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eric Snow (community) | Approve | ||
🤖 Landscape Builder | test results | Approve | |
Daniel Havlik (community) | Approve | ||
Review via email:
|
Commit message
"Raise" a new SignalError from AllOutputProces
The exception is propagated through reactor.errback() rather than actually raised. SignalError happens when a twisted-spawned process exits due to a signal. This is a necessary change because of how twisted errbacks are handled in Python 3. However, it is also a valid change for Python 2 since errbacks align with exceptions, not tuples.
Description of the change
As was mentioned in the comment here by Adam [0], it is necessary, that we issue a proper Exception instead of a tuple if we want to be catched by an errback.
As this code path was not tested before, I added a unittest to cover this.
To post a comment you must log in.
Command: TRIAL_ARGS=-j4 make ci-check /ci.lscape. net/job/ latch-test- xenial/ 3827/
Result: Success
Revno: 997
Branch: lp:~gocept/landscape-client/raise-error-on-signal
Jenkins: https:/