Merge remote-tracking branch 'qubesos/pr/224'

* qubesos/pr/224:
  Fix error on non ASCII PCI IDs upon qvm-device list

Fixed code style.
This commit is contained in:
Marek Marczykowski-Górecki 2018-09-02 03:35:36 +02:00
commit b72b81fb9e
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -42,7 +42,8 @@ def load_pci_classes():
# subclass subclass_name <-- single tab
# prog-if prog-if_name <-- two tabs
result = {}
with open('/usr/share/hwdata/pci.ids') as pciids:
with open('/usr/share/hwdata/pci.ids',
encoding='utf-8', errors='ignore') as pciids:
class_id = None
subclass_id = None
for line in pciids.readlines():