diff --git a/qubesusbproxy/core3ext.py b/qubesusbproxy/core3ext.py index d58e7a5..41e677d 100644 --- a/qubesusbproxy/core3ext.py +++ b/qubesusbproxy/core3ext.py @@ -35,6 +35,7 @@ import tempfile from typing import List, Optional, Dict, Tuple +import qubes.device_protocol import qubes.devices import qubes.ext import qubes.vm.adminvm @@ -48,7 +49,7 @@ HWDATA_PATH = '/usr/share/hwdata' -class USBDevice(qubes.devices.DeviceInfo): +class USBDevice(qubes.device_protocol.DeviceInfo): # pylint: disable=too-few-public-methods def __init__(self, backend_domain, ident): super(USBDevice, self).__init__( @@ -135,7 +136,7 @@ def serial(self) -> str: return result @property - def interfaces(self) -> List[qubes.devices.DeviceInterface]: + def interfaces(self) -> List[qubes.device_protocol.DeviceInterface]: """ List of device interfaces. @@ -148,7 +149,7 @@ def interfaces(self) -> List[qubes.devices.DeviceInterface]: return result @property - def parent_device(self) -> Optional[qubes.devices.DeviceInfo]: + def parent_device(self) -> Optional[qubes.device_protocol.DeviceInfo]: """ The parent device, if any. @@ -157,8 +158,8 @@ def parent_device(self) -> Optional[qubes.devices.DeviceInfo]: return None def _load_interfaces_from_qubesdb(self) \ - -> List[qubes.devices.DeviceInterface]: - result = [qubes.devices.DeviceInterface.unknown()] + -> List[qubes.device_protocol.DeviceInterface]: + result = [qubes.device_protocol.DeviceInterface.unknown()] if not self.backend_domain.is_running(): # don't cache this value return result @@ -169,7 +170,7 @@ def _load_interfaces_from_qubesdb(self) \ if not untrusted_interfaces: return result self._interfaces = result = [ - qubes.devices.DeviceInterface( + qubes.device_protocol.DeviceInterface( self._sanitize(ifc, safe_chars=string.hexdigits), devclass="usb" ) for ifc in untrusted_interfaces.split(b':')