2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Handle mismatched alpha and numeric in hyphenated string

If 123abc-abc123 were attempted, it would produce
a strange error
when it encounters a string compare to number.

Detect the scenario and treat it like similar situations.
This commit is contained in:
Jarrod Johnson 2023-03-30 14:21:22 -04:00
parent cb129789b8
commit a0dbb90c77

View File

@ -186,7 +186,7 @@ class NodeRange(object):
for idx in range(len(leftbits)):
if leftbits[idx] == rightbits[idx]:
finalfmt += leftbits[idx]
elif leftbits[idx][0] in pp.alphas:
elif leftbits[idx][0] in pp.alphas or rightbits[idx][0] in pp.alphas:
# if string portion unequal, not going to work
return self.failorreturn(seqrange)
else: