Browse Source

More helpful error message on the booleanformat helper

Stan Janssen 4 years ago
parent
commit
e7ad164ed8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      openleadr/utils.py

+ 1 - 1
openleadr/utils.py

@@ -336,7 +336,7 @@ def booleanformat(value):
     elif value in ("true", "false"):
     elif value in ("true", "false"):
         return value
         return value
     else:
     else:
-        raise ValueError("A boolean value must be provided.")
+        raise ValueError(f"A boolean value must be provided, not {value}.")
 
 
 def ensure_bytes(obj):
 def ensure_bytes(obj):
     if isinstance(obj, bytes):
     if isinstance(obj, bytes):