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/Float/__init__.py | |
| parent | 1d1889c9d909313499948d329f1b7826a51ed83c (diff) | |
ok all modules working
Diffstat (limited to 'Param/Float/__init__.py')
| -rw-r--r-- | Param/Float/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Param/Float/__init__.py b/Param/Float/__init__.py index eada7ac..0581815 100644 --- a/Param/Float/__init__.py +++ b/Param/Float/__init__.py @@ -1,11 +1,14 @@ from Param import Param -def ParamFloat(Param): +class ParamFloat(Param): def __init__(self, value, classname=""): self._classname = classname - super(ParamFloat).__init__() + super(ParamFloat, self).__init__(classname=classname) try: - self.value = float(value) + if value: + self.value = float(value) + else: + self.value = 0.0 except Exception as e: self.err_warn("Not a float: %s" % str(value)) self.err_warn(str(e)) |
