Commit 93a9ee0f authored by maruel@chromium.org's avatar maruel@chromium.org

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
parent b9be065a
......@@ -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)
......
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