Skip to content
Browse files

Make ConfigValue.bool accept True, False, and None values.

  • Loading branch information...
1 parent 4a8893c commit ccbdf5c7ea87801d9e16895e7a9818d58808ba7e Logan Hanks committed with spladug
Showing with 2 additions and 0 deletions.
  1. +2 −0 r2/r2/lib/configparse.py
View
2 r2/r2/lib/configparse.py
@@ -33,6 +33,8 @@ def float(v, key=None, data=None):
@staticmethod
def bool(v, key=None, data=None):
+ if v in (True, False, None):
+ return bool(v)
try:
return ConfigValue._bool_map[v.lower()]
except KeyError:

0 comments on commit ccbdf5c

Please sign in to comment.
Something went wrong with that request. Please try again.