Skip to content

Commit

Permalink
Update sphinx_needs/filter_common.py
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Sewell <chrisj_sewell@hotmail.com>
  • Loading branch information
big1hc and chrisjsewell committed Sep 5, 2023
1 parent 33d64a5 commit d561b67
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sphinx_needs/filter_common.py
Expand Up @@ -344,9 +344,8 @@ def filter_single_need(
else:
result = eval(filter_string, filter_context)
if not isinstance(result, bool):
# Raises NeedsInvalidFilter if the result is a string type
raise NeedsInvalidFilter(
f"Error when evaluating filter: expected output to have True/False but got a string <{result}>"
f"Filter did not evaluate to a boolean, instead {type(result)}: {result}"
)
except Exception as e:
raise NeedsInvalidFilter(f"Filter {filter_string} not valid. Error: {e}.")
Expand Down

0 comments on commit d561b67

Please sign in to comment.