Skip to content

Commit

Permalink
stable-id: fix in accordance to pylint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
easydozen committed Feb 10, 2021
1 parent 9d75a29 commit 7ad955b
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions qubes/vm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,16 @@ def load_extras(self):
for option in node.xpath('./option'):
options[option.get('name')] = option.text

vm = self.app.domains[node.get('backend-domain')]
ident = node.get('id')
if 'alias' in options:
vm.events_enabled = True
for dev in vm.devices[devclass]:
if options['alias'] == dev.description:
ident = dev.ident
break
vm.events_enabled = False
try:
vm = self.app.domains[node.get('backend-domain')]
ident = node.get('id')
if 'alias' in options:
vm.events_enabled = True
for dev in vm.devices[devclass]:
if options['alias'] == dev.description:
ident = dev.ident
break;
vm.events_enabled = False

device_assignment = qubes.devices.DeviceAssignment(
vm,
ident,
Expand Down

0 comments on commit 7ad955b

Please sign in to comment.