diff --git a/qubes/ext/block.py b/qubes/ext/block.py index 3d3805a14..3a3eb1e58 100644 --- a/qubes/ext/block.py +++ b/qubes/ext/block.py @@ -186,8 +186,12 @@ def parent_device(self) -> Optional[qubes.device_protocol.Device]: devclass = 'usb' if sep == ':' else 'block' if not parent_ident: return None - self._parent = qubes.device_protocol.Device( - self.backend_domain, parent_ident, devclass=devclass) + try: + self._parent = ( + self.backend_domain.devices)[devclass][parent_ident] + except KeyError: + self._parent = qubes.device_protocol.UnknownDevice( + self.backend_domain, parent_ident, devclass=devclass) self._interface_num = interface_num return self._parent