mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
gclient would crash when .gclient is not found.
Fix a problem introduced in r105229. R=cmp@chromium.org BUG= TEST= Review URL: http://codereview.chromium.org/8349001 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106089 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@@ -452,12 +452,11 @@ def FindFileUpwards(filename, path=None):
|
||||
def GetGClientRootAndEntries(path=None):
|
||||
"""Returns the gclient root and the dict of entries."""
|
||||
config_file = '.gclient_entries'
|
||||
config_path = os.path.join(FindFileUpwards(config_file, path), config_file)
|
||||
|
||||
if not config_path:
|
||||
root = FindFileUpwards(config_file, path)
|
||||
if not root:
|
||||
print "Can't find %s" % config_file
|
||||
return None
|
||||
|
||||
config_path = os.path.join(root, config_file)
|
||||
env = {}
|
||||
execfile(config_path, env)
|
||||
config_dir = os.path.dirname(config_path)
|
||||
|
||||
Reference in New Issue
Block a user