Skip to content

Commit a36383a

Browse files
committed
Refactor strtobool function to return boolean values instead of integers
1 parent 3e97e4a commit a36383a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/lib/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ def strtobool(val):
66
"""
77
val = val.lower()
88
if val in ("y", "yes", "t", "true", "on", "1"):
9-
return 1
9+
return True
1010
elif val in ("n", "no", "f", "false", "off", "0"):
11-
return 0
11+
return False
1212
else:
1313
raise ValueError("invalid truth value %r" % (val,))

0 commit comments

Comments
 (0)