diff options
| author | yo mama <pepper@scannerjammer.com> | 2015-09-19 16:13:31 -0700 |
|---|---|---|
| committer | yo mama <pepper@scannerjammer.com> | 2015-09-19 16:13:31 -0700 |
| commit | 8f2230b7c866320e3839d6812b98b8370a7ec5d9 (patch) | |
| tree | d3a9b450c42c39b20a1f13dcdf826c64b140b42e /Param/Bool/__init__.py | |
| parent | 1d1889c9d909313499948d329f1b7826a51ed83c (diff) | |
ok all modules working
Diffstat (limited to 'Param/Bool/__init__.py')
| -rw-r--r-- | Param/Bool/__init__.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Param/Bool/__init__.py b/Param/Bool/__init__.py index 38fa7fa..8ccca00 100644 --- a/Param/Bool/__init__.py +++ b/Param/Bool/__init__.py @@ -1,10 +1,12 @@ from Param import Param - -def ParamBool(Param): +import re +class ParamBool(Param): def __init__(self, value, classname=""): - self._classname = classname - super(ParamBool).__init__() - self.value = self._bool_correct(value) + 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): |
