sb/config.py: Fix operator reconstruction

Close #4337
This commit is contained in:
Ricardo Cárdenes 2021-03-10 21:32:08 -10:00 committed by Vijay Kumar Banerjee
parent d638f2b9a0
commit e5aa419d35

View File

@ -980,9 +980,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, ''))