]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
repo_utils: Always log git clone failure output 1761/head
authorZack Cerza <zack@redhat.com>
Wed, 1 Jun 2022 19:23:29 +0000 (13:23 -0600)
committerZack Cerza <zack@redhat.com>
Wed, 1 Jun 2022 19:23:29 +0000 (13:23 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/repo_utils.py

index 0032366252558f9331bd04cc68cd62d0b05efb9e..ffccc00f3aa697e41cfaab0447cc3993b740ee95 100644 (file)
@@ -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)