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

Unified Diff: recipes.py

Issue 1848813002: Cause CalledProcessErrors to return 2, since its an infra failure. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Add comment. Created 4 years, 9 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: recipes.py
diff --git a/recipes.py b/recipes.py
index 3842441870f8072f0773e1394a594d5a14582ea3..c9fc0de384cc4549ca0dac8848af5e873f035ba1 100755
--- a/recipes.py
+++ b/recipes.py
@@ -351,9 +351,15 @@ def main():
logging.getLogger().setLevel(logging.INFO)
repo_root, config_file = get_package_config(args)
- package_deps = package.PackageDeps.create(
- repo_root, config_file, allow_fetch=not args.no_fetch,
- overrides=args.project_override)
+
+ try:
+ package_deps = package.PackageDeps.create(
+ repo_root, config_file, allow_fetch=not args.no_fetch,
+ overrides=args.project_override)
+ except subprocess.CalledProcessError:
+ # A git checkout failed somewhere. Return 2, which is the sign that this is
+ # an infra failure, rather than a test failure.
+ return 2
if args.command == 'fetch':
# We already did everything in the create() call above.
« 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