aboutsummaryrefslogtreecommitdiffstats
path: root/bsfs/graph/resolve.py
diff options
context:
space:
mode:
Diffstat (limited to 'bsfs/graph/resolve.py')
-rw-r--r--bsfs/graph/resolve.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bsfs/graph/resolve.py b/bsfs/graph/resolve.py
index 9b5f631..b671204 100644
--- a/bsfs/graph/resolve.py
+++ b/bsfs/graph/resolve.py
@@ -96,11 +96,11 @@ class Filter():
# parse child expression
subrng = self._parse_predicate_expression(pred)
# determine the next type
- try:
- if rng is None or subrng > rng: # pick most generic range
- rng = subrng
- except TypeError as err:
- raise errors.ConsistencyError(f'ranges {subrng} and {rng} are not related') from err
+ if rng is None or subrng > rng: # pick most generic range
+ rng = subrng
+ # check range consistency
+ if not subrng <= rng and not subrng >= rng:
+ raise errors.ConsistencyError(f'ranges {subrng} and {rng} are not related')
if not isinstance(rng, (bsc.Node, bsc.Literal)):
raise errors.BackendError(f'the range of node {node} is undefined')
return rng