Commit 4c097ca9 authored by Guillaume Seguin's avatar Guillaume Seguin

Only emit a warning for unknown configuration variables

parent 9446e1f8
...@@ -654,7 +654,7 @@ class pronsole(cmd.Cmd): ...@@ -654,7 +654,7 @@ class pronsole(cmd.Cmd):
if not self.processing_rc and not self.processing_args: if not self.processing_rc and not self.processing_args:
self.save_in_rc("set " + var, "set %s %s" % (var, value)) self.save_in_rc("set " + var, "set %s %s" % (var, value))
except AttributeError: except AttributeError:
self.logError("Unknown variable '%s'" % var) logging.warning("Unknown variable '%s'" % var)
except ValueError, ve: except ValueError, ve:
self.logError("Bad value for variable '%s', expecting %s (%s)" % (var, repr(t)[1:-1], ve.args[0])) self.logError("Bad value for variable '%s', expecting %s (%s)" % (var, repr(t)[1:-1], ve.args[0]))
...@@ -668,7 +668,7 @@ class pronsole(cmd.Cmd): ...@@ -668,7 +668,7 @@ class pronsole(cmd.Cmd):
try: try:
self.log("%s = %s" % (args[0], getattr(self.settings, args[0]))) self.log("%s = %s" % (args[0], getattr(self.settings, args[0])))
except AttributeError: except AttributeError:
self.logError("Unknown variable '%s'" % args[0]) logging.warning("Unknown variable '%s'" % args[0])
return return
self.set(args[0], args[1]) self.set(args[0], args[1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment