diff options
Diffstat (limited to 'Param/Bool')
| -rw-r--r-- | Param/Bool/.__init__.py | 0 | ||||
| -rw-r--r-- | Param/Bool/__init__.py | 18 |
2 files changed, 0 insertions, 18 deletions
diff --git a/Param/Bool/.__init__.py b/Param/Bool/.__init__.py deleted file mode 100644 index e69de29..0000000 --- a/Param/Bool/.__init__.py +++ /dev/null diff --git a/Param/Bool/__init__.py b/Param/Bool/__init__.py deleted file mode 100644 index 8ccca00..0000000 --- a/Param/Bool/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -from Param import Param -import re -class ParamBool(Param): - def __init__(self, value, classname=""): - super(ParamBool, self).__init__(classname=classname) - if value: - self.value = self._bool_correct(value) - else: - self.value = False - def _bool_correct(self, b): - if type(b) == str: - if re.match(r'true', b, re.IGNORECASE): - return True - elif re.match(r'false', b, re.IGNORECASE): - return False - elif type(b) == bool: - return b - self.err_warn("Not a bool: %s" % str(b)) |
