use py.builtin.execfile()

--HG--
branch : trunk
This commit is contained in:
Benjamin Peterson 2009-08-29 15:36:27 -05:00
parent 01848ca821
commit 1781347999
2 changed files with 2 additions and 2 deletions

View File

@ -535,7 +535,7 @@ class LocalPath(FSBase):
mod.__file__ = str(self) mod.__file__ = str(self)
sys.modules[modname] = mod sys.modules[modname] = mod
try: try:
execfile(str(self), mod.__dict__) py.builtin.execfile(str(self), mod.__dict__)
except: except:
del sys.modules[modname] del sys.modules[modname]
raise raise

View File

@ -81,7 +81,7 @@ def process_configfile(configfile, debug=False):
path = configfile.dirpath() path = configfile.dirpath()
configfile_dic = {} configfile_dic = {}
py.std.sys.path.insert(0, str(path)) py.std.sys.path.insert(0, str(path))
execfile(str(configfile), configfile_dic) py.builtin.execfile(str(configfile), configfile_dic)
pagebreak = configfile_dic.get("pagebreak", False) pagebreak = configfile_dic.get("pagebreak", False)
rest_sources = [py.path.local(p) rest_sources = [py.path.local(p)
for p in configfile_dic['rest_sources']] for p in configfile_dic['rest_sources']]