From 34e64fe5d801e168d4ca0c269c6b655d8c814853 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 24 Aug 2015 18:09:01 +0200 Subject: [PATCH] Catch UnicodeEncodeError when passing unicode char as qemu options Fix #292 --- gns3server/modules/qemu/qemu_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/modules/qemu/qemu_vm.py b/gns3server/modules/qemu/qemu_vm.py index 83c43b36..c9c6c6dd 100644 --- a/gns3server/modules/qemu/qemu_vm.py +++ b/gns3server/modules/qemu/qemu_vm.py @@ -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))