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):
2975
2975
#if there is no BLACS connection, make sure there is no "gui" or "worker" entry in the connection table properties
2976
2976
if 'worker' in properties or 'gui' in properties :
2977
2977
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
+
2980
2985
connection_table .append ((device .name , device .__class__ .__name__ ,
2981
2986
device .parent_device .name if device .parent_device else str (None ),
2982
2987
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 ,
2984
2989
serialised_unit_conversion_parameters ,
2985
2990
BLACS_connection ,
2986
2991
serialised_properties ))
You can’t perform that action at this time.
0 commit comments