From 2fe6691e3c7586b66b0a3c51fe9f61133ea923e2 Mon Sep 17 00:00:00 2001 From: Piotr Bartman Date: Sun, 21 Jan 2024 18:56:20 +0100 Subject: [PATCH] assignments -> get_assigned_devices --- qubesusbproxy/core3ext.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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={})