diff options
Diffstat (limited to 'Param/Int')
| -rw-r--r-- | Param/Int/.__init__.py | 0 | ||||
| -rw-r--r-- | Param/Int/__init__.py | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Param/Int/.__init__.py b/Param/Int/.__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Param/Int/.__init__.py diff --git a/Param/Int/__init__.py b/Param/Int/__init__.py new file mode 100644 index 0000000..b7a5d32 --- /dev/null +++ b/Param/Int/__init__.py @@ -0,0 +1,11 @@ +from Param import Param + +def ParamInt(Param): + def __init__(self, value, classname=""): + self._classname = classname + super(ParamInt).__init__() + try: + self.value = int(value) + except Exception as e: + self.err_warn("Not an int: %s" % str(value)) + self.err_warn(str(e)) |
