sync_chrome: don't throw raw traceback on gclient sync failure
If gclient sync failed, it will exit non-zero, and show error messages.
We don't need to crash ourselves as it will confuse users.
BUG=None
TEST=CQ passes
Change-Id: I0b3984270be7147de87de6b16d9394991e6b7276
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3788882
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Sergey Frolov <sfrolov@google.com>
Reviewed-by: Sergey Frolov <sfrolov@google.com>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/sync_chrome.py b/scripts/sync_chrome.py
index cbcf31e..c85ccfb 100644
--- a/scripts/sync_chrome.py
+++ b/scripts/sync_chrome.py
@@ -46,7 +46,10 @@
options.internal, options.version,
options.gclient_template, options.use_cache,
git_cache_dir=options.git_cache_dir)
- gclient.Sync(gclient_path, options.chrome_root, reset=options.reset)
+ try:
+ gclient.Sync(gclient_path, options.chrome_root, reset=options.reset)
+ except cros_build_lib.RunCommandError as e:
+ cros_build_lib.Die(f'gclient sync exited {e.returncode}')
def main(argv):