Update truthystring to return bool, not given int.
This commit is contained in:
parent
5f7266c519
commit
d653673277
1 changed files with 6 additions and 2 deletions
|
@ -358,8 +358,12 @@ def truthystring(s):
|
|||
|
||||
Case insensitive.
|
||||
'''
|
||||
if isinstance(s, (bool, int)) or s is None:
|
||||
return s
|
||||
if s is None:
|
||||
return None
|
||||
|
||||
if isinstance(s, (bool, int)):
|
||||
return bool(s)
|
||||
|
||||
s = s.lower()
|
||||
if s in constants.TRUTHYSTRING_TRUE:
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue