Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Unified Diff: gclient_utils.py

Issue 8349001: gclient would crash when .gclient is not found. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 637b9959df04a78dfbbf106d690a1ad3298142ef..0dcef9df0985745d03109a4f7c4640641ad8c62c 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698