Improve convert_bool error message
The error message as it was confused me when the value was 'enabled' and there was also a module parameter named 'enabled'. enabled is not a valid boolean. Valid booleans include: yes, on, 1, true, ... So by clearly describing it as a value, the confusion would have been avoided. The value 'enabled' is not a valid boolean. Valid booleans include: yes, on, 1, true, ...
This commit is contained in:
parent
17c0d3eae0
commit
487cf0ee8d
1 changed files with 1 additions and 1 deletions
|
@ -23,4 +23,4 @@ def boolean(value, strict=True):
|
|||
elif normalized_value in BOOLEANS_FALSE or not strict:
|
||||
return False
|
||||
|
||||
raise TypeError('%s is not a valid boolean. Valid booleans include: %s' % (to_text(value), ', '.join(repr(i) for i in BOOLEANS)))
|
||||
raise TypeError("The value '%s' is not a valid boolean. Valid booleans include: %s" % (to_text(value), ', '.join(repr(i) for i in BOOLEANS)))
|
||||
|
|
Loading…
Reference in a new issue