Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jeff Weber · committed by Armin Ronacher · parent 1d2a308 · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Armin Ronacher <armin.ronacher@active-4.com>

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:flask/config.py+2 added-1 removed
9 unmodified lines
10"""1112from __future__ import with_statement1314import imp15import os16import sys1718from werkzeug import import_string
95 unmodified lines
114 absolute filename or a filename relative to the115 root path.116 """117 filename = os.path.join(self.root_path, filename)117 d = type(sys)('config')118 d = imp.new_module('config')119 d.__file__ = filename120 try:121 execfile(filename, d.__dict__)122 except IOError, e:
35 unmodified lines