From 7a4aa51703d6669886786de5c2c3f302840bfcc5 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Sun, 23 May 2010 20:33:13 -0400 Subject: [PATCH] Improve error message for bad config parameters. --- gunicorn/app/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gunicorn/app/base.py b/gunicorn/app/base.py index 2f893253..3eb24827 100644 --- a/gunicorn/app/base.py +++ b/gunicorn/app/base.py @@ -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.