From 405c2992f8de441789a1ed82045ab77cefbbedfc Mon Sep 17 00:00:00 2001 From: Jeff Weber Date: Mon, 18 Oct 2010 23:51:14 -0400 Subject: [PATCH] Updated from_pyfile so its dynamic module creation uses the imp module instead of type. Signed-off-by: Armin Ronacher --- flask/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flask/config.py b/flask/config.py index a27b362d..aa65f460 100644 --- a/flask/config.py +++ b/flask/config.py @@ -11,6 +11,7 @@ from __future__ import with_statement +import imp import os import sys @@ -114,7 +115,7 @@ class Config(dict): root path. """ filename = os.path.join(self.root_path, filename) - d = type(sys)('config') + d = imp.new_module('config') d.__file__ = filename try: execfile(filename, d.__dict__)