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

Unified Diff: tools/check_git_config.py

Issue 495613002: Do not complain about wrong gclient config if there's no 'src' solution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: tools/check_git_config.py
diff --git a/tools/check_git_config.py b/tools/check_git_config.py
index f343ff2359d91034c508a195b0a13e2d862b2287..717ad80c7911b9095feae9666dd01cd1914e773f 100755
--- a/tools/check_git_config.py
+++ b/tools/check_git_config.py
@@ -150,8 +150,8 @@ def read_gclient_solution():
try:
env = {}
execfile(GCLIENT_CONFIG, env, env)
- for sol in env['solutions']:
- if sol['name'] == 'src':
+ for sol in (env.get('solutions') or []):
+ if sol.get('name') == 'src':
return sol.get('url'), sol.get('deps_file'), sol.get('managed')
return None, None, None
except Exception:
@@ -353,6 +353,9 @@ def check_git_config(conf, report_url, verbose):
def check_gclient_config(conf):
"""Shows warning if gclient solution is not properly configured for git."""
+ # Ignore configs that do not have 'src' solution at all.
+ if not conf['gclient_url']:
+ return
current = {
'name': 'src',
'deps_file': conf['gclient_deps'],
« 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