Catch UnicodeEncodeError when passing unicode char as qemu options

Fix #292
This commit is contained in:
Julien Duponchelle committed 2015-08-24 18:09:01 +02:00
1 parent 1a04417e84
commit 34e64fe5d8
1 file changed
+1 -1
+1 -1
View File
@@ -853,7 +853,7 @@ class QemuVM(BaseVM):
self.status = "started"
monitor_process(self._process, self._termination_callback)
except (OSError, subprocess.SubprocessError) as e:
except (OSError, subprocess.SubprocessError, UnicodeEncodeError) as e:
stdout = self.read_stdout()
log.error("Could not start QEMU {}: {}\n{}".format(self.qemu_path, e, stdout))
raise QemuError("Could not start QEMU {}: {}\n{}".format(self.qemu_path, e, stdout))