[reader] py3k removed execfile

Related to #267910.

authorJulien Cristau <julien.cristau@logilab.fr>
changeset9ec07467c3fe
branchdefault
phasedraft
hiddenyes
parent revision#db5bd300381a [reader] don't use 3-expr raise syntax
child revision#e092f2799bfc [exceptions] don't use dict.iteritems
files modified by this revision
reader.py
# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1413453178 -7200
# Thu Oct 16 11:52:58 2014 +0200
# Node ID 9ec07467c3fe92d42272b6df492bca72c1985406
# Parent db5bd300381ac470649a34a71a0af7eadefaa71d
[reader] py3k removed execfile

Related to #267910.

diff --git a/reader.py b/reader.py
@@ -255,11 +255,11 @@
1              fglobals['__file__'] = filepath
2              fglobals['__name__'] = modname
3              package = '.'.join(modname.split('.')[:-1])
4              if package and not package in sys.modules:
5                  __import__(package)
6 -            execfile(filepath, fglobals)
7 +            exec(open(filepath).read(), fglobals)
8              # check for use of classes that should be imported, without
9              # importing them
10              for name, obj in fglobals.items():
11                  if isinstance(obj, type) and \
12                         issubclass(obj, buildobjs.Definition) and \