This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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

  • Loading branch information...
Logan Hanks authored and spladug committed Aug 2, 2012
1 parent 4a8893c commit ccbdf5c7ea87801d9e16895e7a9818d58808ba7e
Showing with 2 additions and 0 deletions.
  1. +2 −0 r2/r2/lib/configparse.py
View
@@ -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.