Skip to content

Commit

Permalink
q-dev: device protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrbartman committed Oct 14, 2024
1 parent 8e90d90 commit ed25713
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions qubesadmin/device_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ def port_id(self) -> str:
Unique for given domain and devclass.
"""
return self.__port_id
if self.__port_id is not None:
return self.__port_id
return '*'

@property
def backend_domain(self) -> Optional[QubesVM]:
Expand Down Expand Up @@ -399,7 +401,6 @@ def backend_name(self):
return self.port.backend_name
return '*'


@property
def port_id(self):
if self.port != '*' and self.port.port_id is not None:
Expand Down Expand Up @@ -511,7 +512,8 @@ def _parse(
) -> 'VirtualDevice':
if backend is None:
backend_name, identity = representation.split(sep, 1)
backend = get_domain(backend_name)
if backend_name != '*':
backend = get_domain(backend_name)
else:
identity = representation
port_id, _, devid = identity.partition(':')
Expand Down

0 comments on commit ed25713

Please sign in to comment.