mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 11:28:31 +00:00
migrate.py: python3: when there is no output do not print the heading
Also don't try to decode a possibly None value. Signed-off-by: Uri Lublin <uril@redhat.com>
This commit is contained in:
parent
7318565ecc
commit
77ae94a214
@ -216,9 +216,13 @@ class Migrator(object):
|
||||
dead.wait()
|
||||
new_spice_port = dead.spice_port
|
||||
new_qmp_filename = dead.qmp_filename
|
||||
self.log.write("# STDOUT dead %s\n" % dead.pid)
|
||||
outstr = dead.stdout.read().decode(encoding='utf-8', errors='ignore')
|
||||
self.log.write(outstr)
|
||||
|
||||
outstr = dead.stdout.read()
|
||||
if outstr:
|
||||
outstr = outstr.decode(encoding='utf-8', errors='ignore')
|
||||
self.log.write("# STDOUT dead %s\n" % dead.pid)
|
||||
self.log.write(outstr)
|
||||
|
||||
del dead
|
||||
self.active = self.target
|
||||
self.target = start_qemu(spice_port=new_spice_port,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user