Skip to content

Commit ed25713

Browse files
committed
q-dev: device protocol
1 parent 8e90d90 commit ed25713

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

qubesadmin/device_protocol.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ def port_id(self) -> str:
327327
328328
Unique for given domain and devclass.
329329
"""
330-
return self.__port_id
330+
if self.__port_id is not None:
331+
return self.__port_id
332+
return '*'
331333

332334
@property
333335
def backend_domain(self) -> Optional[QubesVM]:
@@ -399,7 +401,6 @@ def backend_name(self):
399401
return self.port.backend_name
400402
return '*'
401403

402-
403404
@property
404405
def port_id(self):
405406
if self.port != '*' and self.port.port_id is not None:
@@ -511,7 +512,8 @@ def _parse(
511512
) -> 'VirtualDevice':
512513
if backend is None:
513514
backend_name, identity = representation.split(sep, 1)
514-
backend = get_domain(backend_name)
515+
if backend_name != '*':
516+
backend = get_domain(backend_name)
515517
else:
516518
identity = representation
517519
port_id, _, devid = identity.partition(':')

0 commit comments

Comments
 (0)