From c649669929f757189af34cfc980a9aa268543e5c Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Wed, 1 Jun 2022 13:23:29 -0600 Subject: [PATCH] repo_utils: Always log git clone failure output Signed-off-by: Zack Cerza --- teuthology/repo_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index 0032366252..ffccc00f3a 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -163,8 +163,9 @@ def clone_repo(repo_url, dest_path, branch, shallow=True): result = proc.wait() # Newer git versions will bail if the branch is not found, but older ones # will not. Fortunately they both output similar text. - if not_found_str in out: + if result != 0: log.error(out) + if not_found_str in out: if result == 0: # Old git left a repo with the wrong branch. Remove it. shutil.rmtree(dest_path, ignore_errors=True) -- 2.39.5