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/Int/__init__.py | |
| parent | 1d1889c9d909313499948d329f1b7826a51ed83c (diff) | |
ok all modules working
Diffstat (limited to 'Param/Int/__init__.py')
| -rw-r--r-- | Param/Int/__init__.py | 10 |
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)) |
