Skip to content

Commit

Permalink
q-dev: assignments -> get_assigned_devices
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Jun 1, 2024
1 parent 30fa006 commit b8513dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions qubesusbproxy/core3ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,7 @@ def on_qdb_change(self, vm, event, path):
for front_vm in vm.app.domains:
if not front_vm.is_running():
continue
for assignment in front_vm.devices['usb'].assignments(
persistent=True):
for assignment in front_vm.devices['usb'].get_assigned_devices():
if assignment.backend_domain == vm and \
assignment.ident in new_devices:
asyncio.ensure_future(self._attach_and_notify(
Expand Down Expand Up @@ -610,7 +609,7 @@ async def on_device_detach_usb(self, vm, event, device):
@qubes.ext.handler('domain-start')
async def on_domain_start(self, vm, _event, **_kwargs):
# pylint: disable=unused-argument
for assignment in vm.devices['usb'].assignments(persistent=True):
for assignment in vm.devices['usb'].get_assigned_devices():
device = assignment.device
await self.on_device_attach_usb(vm, '', device, options={})

Expand Down

0 comments on commit b8513dc

Please sign in to comment.