File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
qubes_config/global_config Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 2828 DeviceInfo ,
2929 Port ,
3030 DeviceInterface ,
31+ ProtocolError ,
3132)
3233
3334from ..widgets .gtk_widgets import TokenName
@@ -668,8 +669,16 @@ def __init__(self, device: DeviceWrapper):
668669 def new_from_existing (cls , assignments : List [DeviceAssignment ]):
669670 """Create new AssignmentWrapper from a list of DeviceAssignments;
670671 this assumes the DeviceAssignments are appropriately grouped"""
671- device = assignments [0 ].device
672- wrapped_device = DeviceWrapper .new_from_device_info (device_info = device )
672+ try :
673+ device = assignments [0 ].device
674+ wrapped_device = DeviceWrapper .new_from_device_info (device_info = device )
675+ except ProtocolError :
676+ wrapped_device = DeviceWrapper (
677+ assignments [0 ].devclass , assignments [0 ].backend_domain
678+ )
679+ wrapped_device .device_id = assignments [0 ].device_id
680+ wrapped_device .port = assignments [0 ].port
681+ wrapped_device .port_id = assignments [0 ].port_id
673682
674683 aw = cls (wrapped_device )
675684 aw .assignments = assignments
You can’t perform that action at this time.
0 commit comments