Ignore Unicode errors when executing vboxmanage.

This commit is contained in:
Jeremy committed 2014-12-19 15:47:12 -07:00
1 parent 7f37f649da
commit 7785c03eac
3 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -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):
"""