LFUtils.py: slightly better string manipulation for name series

This commit is contained in:
Jed Reynolds
2020-12-01 00:15:47 -08:00
parent f1c7ae9a97
commit 8df9767cd2

View File

@@ -281,16 +281,16 @@ def port_name_series(prefix="sta", start_id=0, end_id=1, padding_number=10000, r
"""
eid = None
if radio != None:
if radio is not None:
eid = name_to_eid(radio)
name_list = []
for i in range((padding_number + start_id), (padding_number + end_id + 1)):
sta_name = prefix + str(i)[1:]
if eid != None:
name_list.append("%i.%i.%s"%(eid[0], eid[1], sta_name))
else:
sta_name = "%s%s" % (prefix, str(i)[1:])
if eid is None:
name_list.append(sta_name)
else:
name_list.append("%i.%i.%s" % (eid[0], eid[1], sta_name))
return name_list