qemu.py: Fix error message when qemu dies from signal
authorEric Blake <eblake@redhat.com>
Fri, 11 Jan 2019 20:13:30 +0000 (14:13 -0600)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 17 Jan 2019 19:52:40 +0000 (17:52 -0200)
When qemu dies from a signal, the python code gets a negative
value for exitcode; but signal numbers are positive.  Copy the
pattern used in qemu-iotests/iotests.py for reporting a positive
value.

CC: qemu-trivial@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190111201330.14473-1-eblake@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
scripts/qemu.py

index 6e3b0e677193299ffa45306b2f6350389256a8e1..0a5e02eb56ed39e1bda14ea171a88d2f997748a9 100644 (file)
@@ -351,7 +351,7 @@ class QEMUMachine(object):
                 command = ' '.join(self._qemu_full_args)
             else:
                 command = ''
-            LOG.warn(msg, exitcode, command)
+            LOG.warn(msg, -exitcode, command)
 
         self._launched = False