When exporting debug information export GNS3 VM vmx content

Fix #740
This commit is contained in:
Julien Duponchelle committed 2016-10-25 11:56:24 +02:00
1 parent 4815904737
commit 59dcdcc141
3 files changed
+30 -12

No files matched your search

@@ -136,6 +136,16 @@ class ServerHandler:
except Exception as e:
# If something is wrong we log the info to the log and we hope the log will be include correctly to the debug export
log.error("Could not export debug informations {}".format(e), exc_info=1)
try:
if Controller.instance().gns3vm.engine == "vmware":
vmx_path = Controller.instance().gns3vm.current_engine().vmx_path
if vmx_path:
shutil.copy(vmx_path, os.path.join(debug_dir, os.path.basename(vmx_path)))
except OSError as e:
# If something is wrong we log the info to the log and we hope the log will be include correctly to the debug export
log.error("Could not copy VMware VMX file {}".format(e), exc_info=1)
response.set_status(201)
@staticmethod