summaryrefslogtreecommitdiff
path: root/cliapp/app.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-10-30 11:40:53 +0000
committerLars Wirzenius <liw@liw.fi>2013-10-30 11:40:53 +0000
commit262056afcc2838dc7ac5e430744e99945d535fff (patch)
tree98ebf567c4e3f9d5716d013d6995a934bda74373 /cliapp/app.py
parent7efa8ac96f1debcfe35b4203f7b9d442dea02587 (diff)
downloadcliapp-262056afcc2838dc7ac5e430744e99945d535fff.tar.gz
Nicely report unknown variables in config files
Previously we would just raise an ugly exception, now there's a clear error message.
Diffstat (limited to 'cliapp/app.py')
-rw-r--r--cliapp/app.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cliapp/app.py b/cliapp/app.py
index 54a6839..5e49bf0 100644
--- a/cliapp/app.py
+++ b/cliapp/app.py
@@ -190,6 +190,9 @@ class Application(object):
self.process_args(args)
self.cleanup()
self.disable_plugins()
+ except cliapp.UnknownConfigVariable, e: # pragma: no cover
+ stderr.write('ERROR: %s\n' % str(e))
+ sys.exit(1)
except AppException, e:
log(traceback.format_exc())
stderr.write('ERROR: %s\n' % str(e))