Commit 47c142b0 authored by Julien Muchembled's avatar Julien Muchembled

erp5.util.testnode: do not crash on connection failure to slapproxy

ConnectionError does not have status_dict
parent b7681cd6
...@@ -431,7 +431,8 @@ shared = true ...@@ -431,7 +431,8 @@ shared = true
except (SubprocessError, CalledProcessError, ConnectionError) as e: except (SubprocessError, CalledProcessError, ConnectionError) as e:
log("", exc_info=1) log("", exc_info=1)
if remote_test_result_needs_cleanup: if remote_test_result_needs_cleanup:
status_dict = e.status_dict or {} status_dict = getattr(e, "status_dict", None) or {
'stderr': "%s: %s" % (e.__class__.__name__, e)}
test_result.reportFailure( test_result.reportFailure(
command=status_dict.get('command'), command=status_dict.get('command'),
stdout=status_dict.get('stdout'), stdout=status_dict.get('stdout'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment