Skip to content

Commit

Permalink
q-dev: port
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Oct 14, 2024
1 parent 8c67d72 commit 8671b55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qubesusbproxy/core3ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ def description(self):
return self.name

class DeviceInfo(DescriptionOverrider, LegacyDeviceInfo):
def __init__(self, *args, **kwargs):
def __init__(self, port):
# not supported options in legacy code
del kwargs['devclass']
self.safe_chars = self.safe_chars.replace(' ', '')
super().__init__(*args, **kwargs)
super().__init__(port.backend_domain, port.ident)

# needed but not in legacy DeviceInfo
self._vendor = None
Expand Down Expand Up @@ -101,8 +100,9 @@ def __init__(self, backend_domain, ident):
# the superclass can restrict the allowed characters
self.safe_chars = (string.ascii_letters + string.digits
+ string.punctuation + ' ')
super(USBDevice, self).__init__(
port = qubes.device_protocol.Port(
backend_domain=backend_domain, ident=ident, devclass="usb")
super(USBDevice, self).__init__(port)

self._qdb_ident = ident.replace('.', '_')
self._qdb_path = '/qubes-usb-devices/' + self._qdb_ident
Expand Down

0 comments on commit 8671b55

Please sign in to comment.