Permalink
Browse files

Updated from_pyfile so its dynamic module creation uses the imp modul…

…e instead of type.

Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
  • Loading branch information...
1 parent 1d2a308 commit 405c2992f8de441789a1ed82045ab77cefbbedfc @jbweber jbweber committed with mitsuhiko Oct 19, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 flask/config.py
View
@@ -11,6 +11,7 @@
from __future__ import with_statement
+import imp
import os
import sys
@@ -114,7 +115,7 @@ def from_pyfile(self, filename):
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__)

0 comments on commit 405c299

Please sign in to comment.