Skip to content

Commit

Permalink
assignments -> get_assigned_devices
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Jan 21, 2024
1 parent 57ab394 commit 2fe6691
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 @@ -238,8 +238,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 @@ -389,7 +388,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 2fe6691

Please sign in to comment.