mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Ignore Unicode errors when executing vboxmanage.
This commit is contained in:
1 parent
7f37f649da
commit
7785c03eac
3 files changed
+10
-10
No files matched your search
@@ -724,7 +724,7 @@ class VirtualBox(IModule):
|
||||
result = subprocess.check_output(command, stderr=subprocess.STDOUT, timeout=30)
|
||||
except (OSError, subprocess.SubprocessError) as e:
|
||||
raise VirtualBoxError("Could not execute VBoxManage {}".format(e))
|
||||
return result.decode("utf-8")
|
||||
return result.decode("utf-8", errors="ignore")
|
||||
|
||||
@IModule.route("virtualbox.vm_list")
|
||||
def vm_list(self, request):
|
||||
|
||||
@@ -560,7 +560,7 @@ class VirtualBoxVM(object):
|
||||
raise VirtualBoxError("{}".format(e))
|
||||
except (OSError, subprocess.SubprocessError) as e:
|
||||
raise VirtualBoxError("Could not execute VBoxManage: {}".format(e))
|
||||
return result.decode("utf-8").splitlines()
|
||||
return result.decode("utf-8", errors="ignore").splitlines()
|
||||
|
||||
def _get_vm_info(self):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user