From 2c5f221d1af755e6ffc9b0c3ee0c384b9e3db4a0 Mon Sep 17 00:00:00 2001 From: "Paul J. Davis" Date: Mon, 26 Apr 2010 13:29:23 -0400 Subject: [PATCH] Fix KeyError if builtins isn't touched. --- gunicorn/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/config.py b/gunicorn/config.py index d17112f6..04e47a4f 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -53,7 +53,7 @@ class Config(object): execfile(path, globals(), self.cfg) except Exception, e: sys.exit("Could not read config file: %r\n %s" % (path, e)) - self.cfg.pop("__builtins__") + self.cfg.pop("__builtins__", None) opts = [(k, v) for (k, v) in opts.iteritems() if v is not None] self.cfg.update(dict(opts))