diff options
Diffstat (limited to 'lib/Param/Bool/__init__.py')
| -rw-r--r-- | lib/Param/Bool/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Param/Bool/__init__.py b/lib/Param/Bool/__init__.py index 8ccca00..7b779cb 100644 --- a/lib/Param/Bool/__init__.py +++ b/lib/Param/Bool/__init__.py @@ -1,5 +1,6 @@ from Param import Param import re +import sys class ParamBool(Param): def __init__(self, value, classname=""): super(ParamBool, self).__init__(classname=classname) @@ -8,7 +9,7 @@ class ParamBool(Param): else: self.value = False def _bool_correct(self, b): - if type(b) == str: + if type(b) == str or type(b) == unicode: if re.match(r'true', b, re.IGNORECASE): return True elif re.match(r'false', b, re.IGNORECASE): |
