summaryrefslogtreecommitdiff
path: root/Param/Bool
diff options
context:
space:
mode:
authoryo mama <pepper@scannerjammer.com>2015-09-21 14:20:13 -0700
committeryo mama <pepper@scannerjammer.com>2015-09-21 14:20:13 -0700
commitb29b0ec5f11dd66434cbdfba5287c4777d7f8ac9 (patch)
treef02f45661bdab855d8392e14ba6448546586bf37 /Param/Bool
parent8f2230b7c866320e3839d6812b98b8370a7ec5d9 (diff)
new file structure
Diffstat (limited to 'Param/Bool')
-rw-r--r--Param/Bool/.__init__.py0
-rw-r--r--Param/Bool/__init__.py18
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))