Skip to content

Commit

Permalink
q-dev: fix assignment.devices
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Oct 29, 2024
1 parent 73ea327 commit 9a77764
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qubes/device_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ def devices(self) -> List[DeviceInfo]:
dev = self.backend_domain.devices[self.devclass][self.port_id]
if (
isinstance(dev, UnknownDevice)
or dev.device_id == self.device_id
or self.device_id in (dev.device_id, "*")
):
return [dev]
result = []
Expand Down
5 changes: 2 additions & 3 deletions qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,9 +1178,8 @@ async def start(self, start_guid=True, notify_function=None,
qmemman_client = None
try:
for devclass in self.devices:
for ass in self.devices[devclass].get_assigned_devices():
if not ass.required:
continue
for ass in self.devices[devclass].get_assigned_devices(
required_only=True):
for device in ass.devices:
if not isinstance(
device, qubes.device_protocol.UnknownDevice
Expand Down

0 comments on commit 9a77764

Please sign in to comment.