Browse Source

Updated from_pyfile so its dynamic module creation uses the imp module instead of type.

Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>
pull/127/head
Jeff Weber 14 years ago committed by Armin Ronacher
parent
commit
405c2992f8
  1. 3
      flask/config.py

3
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__)

Loading…
Cancel
Save