Update truthystring to return bool, not given int.

This commit is contained in:
voussoir 2018-02-24 23:01:44 -08:00
parent 5f7266c519
commit d653673277

View file

@ -358,8 +358,12 @@ def truthystring(s):
Case insensitive. Case insensitive.
''' '''
if isinstance(s, (bool, int)) or s is None: if s is None:
return s return None
if isinstance(s, (bool, int)):
return bool(s)
s = s.lower() s = s.lower()
if s in constants.TRUTHYSTRING_TRUE: if s in constants.TRUTHYSTRING_TRUE:
return True return True