Make setup_links.py not fail if Chromium checkout is missing.
If a checkout has been created but haven't yet executed gclient
runhooks, running setup_links.py --clean-only will fail if
the Chromium checkout isn't yet synced. This can make bots
end up in a bad state since we now clean all links before running
bot_update. Relaxing this error solves that problem.
BUG=chromium:663278
TBR=ehmaldonado@webrtc.org
NOTRY=True
Review URL: https://codereview.webrtc.org/2496323004 .
Cr-Commit-Position: refs/heads/master@{#15097}
diff --git a/setup_links.py b/setup_links.py
index 637f95b..e546892 100755
--- a/setup_links.py
+++ b/setup_links.py
@@ -507,9 +507,10 @@
'administrator. Please run with user account privileges.')
if not os.path.exists(CHROMIUM_CHECKOUT):
- logging.error('Cannot find a Chromium checkout at %s. Did you run "gclient '
- 'sync" before running this script?', CHROMIUM_CHECKOUT)
- return 2
+ logging.warning('Cannot find a Chromium checkout at %s. Did you run '
+ '"gclient sync" before running this script?',
+ CHROMIUM_CHECKOUT)
+ return 0
links_database = _initialize_database(LINKS_DB)
try: