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

Unified Diff: gcl.py

Issue 118265: Fix gcl in the case there is no CODEREVIEW_SETTINGS file in the repository.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 7 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: gcl.py
===================================================================
--- gcl.py (revision 17630)
+++ gcl.py (working copy)
@@ -178,11 +178,13 @@
# already initialized.
global CODEREVIEW_SETTINGS
if '__just_initialized' not in CODEREVIEW_SETTINGS:
- for line in GetCachedFile(CODEREVIEW_SETTINGS_FILE).splitlines():
- if not line or line.startswith("#"):
- continue
- k, v = line.split(": ", 1)
- CODEREVIEW_SETTINGS[k] = v
+ settings_file = GetCachedFile(CODEREVIEW_SETTINGS_FILE)
+ if settings_file:
+ for line in settings_file.splitlines():
+ if not line or line.startswith("#"):
+ continue
+ k, v = line.split(": ", 1)
+ CODEREVIEW_SETTINGS[k] = v
CODEREVIEW_SETTINGS.setdefault('__just_initialized', None)
return CODEREVIEW_SETTINGS.get(key, "")
« 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