Fix KeyError if builtins isn't touched.

This commit is contained in:
Paul J. Davis 2010-04-26 13:29:23 -04:00
parent ab25537b67
commit 2c5f221d1a

View File

@ -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))