Improve error message for bad config parameters.

This commit is contained in:
Paul J. Davis 2010-05-23 20:33:13 -04:00
parent aee54903a6
commit 7a4aa51703

View File

@ -52,7 +52,11 @@ class Application(object):
# Ignore unknown names
if k not in self.cfg.settings:
continue
self.cfg.set(k.lower(), v)
try:
self.cfg.set(k.lower(), v)
except:
sys.stderr.write("Invalid value for %s: %s\n\n" % (k, v))
raise
# Lastly, update the configuration with any command line
# settings.