Prevent 'qubesd' for crashing if any device backend is not available
This commit is contained in:
parent
aa931fdbf7
commit
74f8d4531e
@ -268,6 +268,7 @@ class BaseVM(qubes.PropertyHolder):
|
|||||||
for option in node.xpath('./option'):
|
for option in node.xpath('./option'):
|
||||||
options[option.get('name')] = option.text
|
options[option.get('name')] = option.text
|
||||||
|
|
||||||
|
try:
|
||||||
device_assignment = qubes.devices.DeviceAssignment(
|
device_assignment = qubes.devices.DeviceAssignment(
|
||||||
self.app.domains[node.get('backend-domain')],
|
self.app.domains[node.get('backend-domain')],
|
||||||
node.get('id'),
|
node.get('id'),
|
||||||
@ -275,6 +276,11 @@ class BaseVM(qubes.PropertyHolder):
|
|||||||
persistent=True
|
persistent=True
|
||||||
)
|
)
|
||||||
self.devices[devclass].load_persistent(device_assignment)
|
self.devices[devclass].load_persistent(device_assignment)
|
||||||
|
except KeyError:
|
||||||
|
msg = "{}: Cannot find backend domain '{}' for device type {} '{}'".format(self.name, node.get(
|
||||||
|
'backend-domain'), devclass, node.get('id'))
|
||||||
|
self.log.info(msg)
|
||||||
|
continue
|
||||||
|
|
||||||
# tags
|
# tags
|
||||||
for node in self.xml.xpath('./tags/tag'):
|
for node in self.xml.xpath('./tags/tag'):
|
||||||
|
Loading…
Reference in New Issue
Block a user