core: log pci detach error on VM shutdown

Thanks @Rudd-O for pointing this out.
This commit is contained in:
Marek Marczykowski-Górecki 2015-12-26 14:05:21 +01:00
parent 169eac6412
commit 9809e4168e
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1958,8 +1958,9 @@ class QubesVm(object):
try:
for pcidev in self.pcidevs:
self.libvirt_domain.detachDevice(self._format_pci_dev(pcidev))
except libvirt.libvirtError:
pass
except libvirt.libvirtError as e:
print >>sys.stderr, "WARNING: {}, continuing VM shutdown " \
"anyway".format(str(e))
self.libvirt_domain.shutdown()