Skip to content

Commit d561b67

Browse files
big1hcchrisjsewell
andauthored
Update sphinx_needs/filter_common.py
Co-authored-by: Chris Sewell <[email protected]>
1 parent 33d64a5 commit d561b67

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sphinx_needs/filter_common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,8 @@ def filter_single_need(
344344
else:
345345
result = eval(filter_string, filter_context)
346346
if not isinstance(result, bool):
347-
# Raises NeedsInvalidFilter if the result is a string type
348347
raise NeedsInvalidFilter(
349-
f"Error when evaluating filter: expected output to have True/False but got a string <{result}>"
348+
f"Filter did not evaluate to a boolean, instead {type(result)}: {result}"
350349
)
351350
except Exception as e:
352351
raise NeedsInvalidFilter(f"Filter {filter_string} not valid. Error: {e}.")

0 commit comments

Comments
 (0)