Skip to content

Commit

Permalink
q-dev: fix attaching usb devices on domain start
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Jun 1, 2024
1 parent fca4777 commit 9094561
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions qubesusbproxy/core3ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion qubesusbproxy/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 9094561

Please sign in to comment.