summaryrefslogtreecommitdiff
path: root/lib/param/param.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/param/param.py')
-rw-r--r--lib/param/param.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/param/param.py b/lib/param/param.py
index d1e1446..3268274 100644
--- a/lib/param/param.py
+++ b/lib/param/param.py
@@ -36,9 +36,9 @@ class Param(object):
except Exception as e:
self.err_warn("Unable to set value {}".format(value))
- def err_warn(self, s, error=None):
- self._error_log(s, error=error)
- raise BadParamError("%s - %s" % (self._classname, s))
+ def err_warn(self, s):
+ self._error_log(s)
+ raise BadParamError("%s - %s\n" % (self._classname, s))
def __getattr__(self, key):
try:
@@ -50,10 +50,8 @@ class Param(object):
self._log(s, error, fatal=True)
sys.exit(1)
- def _error_log(self, s, error=None, fatal=False):
+ def _error_log(self, s, fatal=False):
message = "ERROR - BAD PARAM"
if fatal: message += "- [FATAL] -"
sys.stderr.write("{}:{} - {}\n".format(message, self._classname, s))
- if error:
- sys.stderr.write("PARAM ERROR: {}\n".format(str(error)))