summaryrefslogtreecommitdiff
path: root/Param/Int/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Param/Int/__init__.py')
-rw-r--r--Param/Int/__init__.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Param/Int/__init__.py b/Param/Int/__init__.py
index 4d52bdf..0a73cc1 100644
--- a/Param/Int/__init__.py
+++ b/Param/Int/__init__.py
@@ -1,11 +1,13 @@
from Param import Param
-def ParamInt(Param):
+class ParamInt(Param):
def __init__(self, value, classname=""):
- self._classname = classname
- super(ParamInt).__init__()
+ super(ParamInt, self).__init__(classname=classname)
try:
- self.value = int(value)
+ if value:
+ self.value = int(value)
+ else:
+ self.value = 0
except Exception as e:
self.err_warn("Not an int: %s" % str(value))
self.err_warn(str(e))