Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion siriuspy/siriuspy/namesys/implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,21 @@ def _subsec_comp(self, other):
elif len(th_ssec) == 2:
return True
if my_ssec[2] == th_ssec[2]:
return my_ssec[3] < th_ssec[3]
# TODO: make an appropriate fix (or test this one!)
# print(self, other)
# failing comparison for the two pvnames below:
# BO-01D03D:MP-Summary:IntlkDesc-Cte
# BO-01D:MP-InjKckr:IntlkDesc-Cte
try:
return my_ssec[3] < th_ssec[3]
except IndexError:
my_len, th_len = len(my_ssec), len(th_ssec)
for idx in range(3, min(my_len, th_len)):
if my_ssec[idx] < th_ssec[idx]:
return True
elif my_ssec[idx] > th_ssec[idx]:
return False
return my_len < th_len
elif my_ssec[2] == 'C':
return False
elif th_ssec[2] == 'C':
Expand All @@ -361,6 +375,7 @@ def _subsec_comp(self, other):
elif my_ssec[2:4] == 'M2':
return False


@staticmethod
def is_write_pv(pvname):
"""."""
Expand Down
Loading