diff --git a/qubesusbproxy/core3ext.py b/qubesusbproxy/core3ext.py index 01aa910..9aea5f3 100644 --- a/qubesusbproxy/core3ext.py +++ b/qubesusbproxy/core3ext.py @@ -609,8 +609,8 @@ async def on_device_detach_usb(self, vm, event, device): async def on_domain_start(self, vm, _event, **_kwargs): # pylint: disable=unused-argument for assignment in vm.devices['usb'].get_assigned_devices(): - asyncio.ensure_future(self.attach_and_notify( - vm, assignment.device, assignment.options)) + await self.attach_and_notify( + vm, assignment.device, assignment.options) @qubes.ext.handler('domain-shutdown') async def on_domain_shutdown(self, vm, _event, **_kwargs): diff --git a/qubesusbproxy/tests.py b/qubesusbproxy/tests.py index a268219..30b1d98 100644 --- a/qubesusbproxy/tests.py +++ b/qubesusbproxy/tests.py @@ -395,7 +395,7 @@ def test_010_assign(self): wait=True), 0, "Device connection failed") - self.assertEquals(usb_dev.attachment, + self.assertEqual(usb_dev.attachment, self.frontend) def test_020_attach(self):