From 8f2230b7c866320e3839d6812b98b8370a7ec5d9 Mon Sep 17 00:00:00 2001 From: yo mama Date: Sat, 19 Sep 2015 16:13:31 -0700 Subject: ok all modules working --- Param/Int/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Param/Int') 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)) -- cgit v1.2.3-70-g09d2