diff --git a/qubesusbproxy/core3ext.py b/qubesusbproxy/core3ext.py index 34f56cc..b1a4979 100644 --- a/qubesusbproxy/core3ext.py +++ b/qubesusbproxy/core3ext.py @@ -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( @@ -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={})