summaryrefslogtreecommitdiff
path: root/lib/Param/Bool.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Param/Bool.py')
-rw-r--r--lib/Param/Bool.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/Param/Bool.py b/lib/Param/Bool.py
deleted file mode 100644
index 7b779cb..0000000
--- a/lib/Param/Bool.py
+++ /dev/null
@@ -1,19 +0,0 @@
-from Param import Param
-import re
-import sys
-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 or type(b) == unicode:
- 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))