diff --git a/qubes/api/admin.py b/qubes/api/admin.py index 75b708fd5..5bcb60769 100644 --- a/qubes/api/admin.py +++ b/qubes/api/admin.py @@ -1216,7 +1216,8 @@ async def vm_device_available(self, endpoint): scope='local', read=True) async def vm_device_list(self, endpoint): devclass = endpoint - device_assignments = self.dest.devices[devclass].get_assigned_devices() + device_assignments = list( + self.dest.devices[devclass].get_assigned_devices()) if self.arg: select_backend, select_ident = self.arg.split('+', 1) device_assignments = [dev for dev in device_assignments diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index f604eb0ff..a38d46432 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -169,7 +169,7 @@ def _setter_kbd_layout(self, prop, value): def _default_virt_mode(self): - if self.devices['pci'].get_assigned_devices(): + if list(self.devices['pci'].get_assigned_devices()): return 'hvm' try: return self.template.virt_mode