diff --git a/site_ansto/instrument/util/gen_sct.py b/site_ansto/instrument/util/gen_sct.py index a4130931..050897cd 100755 --- a/site_ansto/instrument/util/gen_sct.py +++ b/site_ansto/instrument/util/gen_sct.py @@ -1283,7 +1283,10 @@ def put_group(MyDriver, MyGroup): if fetch_func == 'none': fetch_func = 'getValue' read_func = MyVar['read_function'] - read_command = MyVar['read_command'] + if 'read_command' in MyVar: + read_command = MyVar['read_command'] + else: + read_command = '' txt += [' hsetprop ${scobj_hpath}/%s read ${ns}::%s ${scobj_hpath} %s {%s}' % (nodename, fetch_func, read_func, read_command)] txt += [' hsetprop ${scobj_hpath}/%s %s ${ns}::%s ${scobj_hpath}' % (nodename, read_func, read_func)] if MyVar['writeable'] > 0 or MyVar['driveable']: