Fix bug in PCIDeviceExtension: decode buffer to string

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2017-04-01 01:06:32 +02:00
parent 96db9a46d1
commit 9d08e4b792
No known key found for this signature in database
GPG Key ID: 07799AE179ED4FD4

View File

@ -248,7 +248,7 @@ class PCIDeviceExtension(qubes.ext.Extension):
p = subprocess.Popen(['xl', 'pci-list', str(vm.xid)],
stdout=subprocess.PIPE)
result = p.communicate()[0]
result = p.communicate()[0].decode()
m = re.search(r'^(\d+.\d+)\s+0000:{}$'.format(device.ident), result,
flags=re.MULTILINE)
if not m: