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
experimental/szager/collated-output
maruel@chromium.org 14 years ago
parent b9be065ac1
commit 93a9ee0f72

@ -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)

Loading…
Cancel
Save