diff options
author | Ricardo Cárdenes <rcardenes@gemini.edu> | 2021-03-10 21:32:08 -1000 |
---|---|---|
committer | Vijay Kumar Banerjee <vijay@rtems.org> | 2021-03-11 09:54:13 -0700 |
commit | e5aa419d3581b034b4bf7c2f93982500b6efa34e (patch) | |
tree | 6abb0a837ed58acfebd68fc8a746368e7f243e98 | |
parent | sb/config.py: Fix relational operator (diff) | |
download | rtems-source-builder-e5aa419d3581b034b4bf7c2f93982500b6efa34e.tar.bz2 |
sb/config.py: Fix operator reconstruction
Close #4337
-rw-r--r-- | source-builder/sb/config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py index 04e0834..a40147d 100644 --- a/source-builder/sb/config.py +++ b/source-builder/sb/config.py @@ -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, '')) |