qubes/ext/pci: fix handling dom0 before starting first VM

Before starting fist VM, backend/pci xenstore directory does not exists.
Do not crash on it

QubesOS/qubes-issues#2257
This commit is contained in:
Marek Marczykowski-Górecki 2016-09-12 06:06:51 +02:00
parent 2956f62bbc
commit 8ca08c7790
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -97,8 +97,8 @@ def attached_devices(app):
xs = app.vmm.xs xs = app.vmm.xs
devices = {} devices = {}
for domid in xs.ls('', 'backend/pci'): for domid in xs.ls('', 'backend/pci') or []:
for devid in xs.ls('', 'backend/pci/' + domid): for devid in xs.ls('', 'backend/pci/' + domid) or []:
devpath = 'backend/pci/' + domid + '/' + devid devpath = 'backend/pci/' + domid + '/' + devid
domain_name = xs.read('', devpath + '/domain') domain_name = xs.read('', devpath + '/domain')
try: try: