From a0dbb90c77167a9a3db90a7fcb8150491ba84f60 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 30 Mar 2023 14:21:22 -0400 Subject: [PATCH] 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. --- confluent_server/confluent/noderange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/noderange.py b/confluent_server/confluent/noderange.py index f7b88ef4..b59bf7c6 100644 --- a/confluent_server/confluent/noderange.py +++ b/confluent_server/confluent/noderange.py @@ -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: