Commit 107c97c8 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

gclient_utils: Stop using execfile()

execfile() does not exist in Python 3; replace it with open(), read()
and exec().

Bug: 984182
Change-Id: I2266ff2bd63bffc458bd04500c8c0d6c360f1b4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1844831
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
parent 4102985e
......@@ -704,7 +704,8 @@ def GetGClientRootAndEntries(path=None):
return None
config_path = os.path.join(root, config_file)
env = {}
execfile(config_path, env)
with open(config_path) as config:
exec(config.read(), env)
config_dir = os.path.dirname(config_path)
return config_dir, env['entries']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment