File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2975,12 +2975,17 @@ def generate_connection_table(hdf5_file):
29752975 #if there is no BLACS connection, make sure there is no "gui" or "worker" entry in the connection table properties
29762976 if 'worker' in properties or 'gui' in properties :
29772977 raise LabscriptError ('You cannot specify a remote GUI or worker for a device (%s) that does not have a tab in BLACS' % (device .name ))
2978-
2979-
2978+
2979+ if getattr (device , 'unit_conversion_class' , None ) is not None :
2980+ c = device .unit_conversion_class
2981+ unit_conversion_class_repr = f"{ c .__module__ } .{ c .__name__ } "
2982+ else :
2983+ unit_conversion_class_repr = repr (None )
2984+
29802985 connection_table .append ((device .name , device .__class__ .__name__ ,
29812986 device .parent_device .name if device .parent_device else str (None ),
29822987 str (device .connection if device .parent_device else str (None )),
2983- device . unit_conversion_class . __name__ if hasattr ( device , "unit_conversion_class" ) and device . unit_conversion_class is not None else str ( None ) ,
2988+ unit_conversion_class_repr ,
29842989 serialised_unit_conversion_parameters ,
29852990 BLACS_connection ,
29862991 serialised_properties ))
You can’t perform that action at this time.
0 commit comments