ext/pci: fix error message about missing device

Print human readable device name, instead of "<PCIDevice at ...".

QubesOS/qubes-issues#4461
This commit is contained in:
Marek Marczykowski-Górecki 2018-11-01 22:28:50 +01:00
parent 00ca0459d9
commit 64f290c9ba
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -300,7 +300,7 @@ class PCIDeviceExtension(qubes.ext.Extension):
except libvirt.libvirtError as e:
if e.get_error_code() == libvirt.VIR_ERR_NO_NODE_DEVICE:
raise qubes.exc.QubesException(
'PCI device {!r} does not exist'.format(
'PCI device {!s} does not exist'.format(
device))
raise