Unittest - SIGABORT was not being correctly identified

* In Python if the process receives a signal, the exit code is negative
This commit is contained in:
Renato Alves 2014-10-20 13:52:02 +01:00
parent b4f33ec0c6
commit c9102fd79c

View file

@ -9,7 +9,7 @@ class CommandError(Exception):
"\n*** Start STDOUT ***\n{2}\n*** End STDOUT ***\n"
"\n*** Start STDERR ***\n{3}\n*** End STDERR ***\n"
)
if code == signal.SIGABRT:
if code == -signal.SIGABRT:
self.msg = ("Command '{0}' was aborted, likely due to not "
"finishing in due time. The exit code was '{1}'.\n"
) + msg_suffix