From b7bf97039cd4a1c93e0b3dee70d671a88ab012ae Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 29 Aug 2016 13:53:53 +0200 Subject: [PATCH] Avoid dead lock if you can not close the GNS3VM at exit --- gns3server/controller/gns3vm/vmware_gns3_vm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gns3server/controller/gns3vm/vmware_gns3_vm.py b/gns3server/controller/gns3vm/vmware_gns3_vm.py index 7e50c46a..2de100c3 100644 --- a/gns3server/controller/gns3vm/vmware_gns3_vm.py +++ b/gns3server/controller/gns3vm/vmware_gns3_vm.py @@ -134,6 +134,9 @@ class VMwareGNS3VM(BaseGNS3VM): if self._vmx_path is None: raise GNS3VMError("No VMX path configured, can't stop the VM") - yield from self._execute("stop", [self._vmx_path, "soft"]) + try: + yield from self._execute("stop", [self._vmx_path, "soft"]) + except VMwareError as e: + log.warning("Error when stopping the VM: {}".format(str(e))) log.info("GNS3 VM has been stopped") self.running = False