mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
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: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
committed by
Commit Bot
parent
4102985e14
commit
107c97c837
@@ -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']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user