This exposed various problems in the recent contextmanagement work,
e.g. the assertions in the __del__ methods had been failing. Of
course this means that from now on, asserts should only be used to
detect fatal problems.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
[rlb@defaultvalue.org: adjust commit message]
Tested-by: Rob Browning <rlb@defaultvalue.org>
failures = [line for line in lines
if (line.startswith(b'!')
and line.lower().endswith(b' failed'))]
+ if b'AssertionError' in out:
+ raise BupSubprocFailure('AssertionError detected')
if failures or p.returncode != 0:
raise BupSubprocFailure('%s failed (exit %d, %d failures)'
% (cmd, p.returncode, len(failures)),