sb/config.py: Fix operator reconstruction

Close #4335
This commit is contained in:
Ricardo Cárdenes 2021-03-10 21:32:08 -10:00 committed by Vijay Kumar Banerjee
parent fe2d13b6da
commit 5e449fb5c2

View File

@ -991,9 +991,9 @@ class file:
else:
if len(ifls) >= 3:
for op in ['==', '!=', '>=', '=>', '=<', '<=', '>', '<']:
ops = s.split(op)
if len(ops) == 2:
ifls = (ops[0], op, ops[1])
if op in ifls:
op_pos = ifls.index(op)
ifls = (' '.join(ifls[:op_pos]), op, ' '.join(ifls[op_pos + 1:]))
break
if len(ifls) != 3:
self._error('malformed if: ' + reduce(add, ls, ''))