mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
run-test: drop 'execfile' usage for 'common-pattern.py' file
This is required for Python 3.
This commit is contained in:
parent
892a48dd6e
commit
36f8a40cbc
@ -973,8 +973,11 @@ class Test(unittest.TestCase):
|
||||
|
||||
if os.path.exists(replacementfile):
|
||||
data = {}
|
||||
execfile(replacementfile, data)
|
||||
r.extend(data.get('substitutions', ()))
|
||||
with open(replacementfile, mode='rb') as source:
|
||||
# the intermediate 'compile' step help with debugging
|
||||
code = compile(source.read(), replacementfile, 'exec')
|
||||
exec(code, data)
|
||||
r.extend(data.get('substitutions', ()))
|
||||
return r
|
||||
|
||||
def _escapepath(self, p):
|
||||
|
Loading…
Reference in New Issue
Block a user