From a0c61406f09548827f400154df39bff67f5a75c7 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Thu, 17 Aug 2017 11:00:55 +0200 Subject: [PATCH] Let's not crash the entire script if the repo is present but empty This is the case with : https://src.fedoraproject.org/rpms/ntetris https://src.fedoraproject.org/rpms/python-yubikey-manager --- roles/distgit/templates/pkgdb_sync_git_branches.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/distgit/templates/pkgdb_sync_git_branches.py b/roles/distgit/templates/pkgdb_sync_git_branches.py index d84a1b1ec7..a2b5c407c0 100644 --- a/roles/distgit/templates/pkgdb_sync_git_branches.py +++ b/roles/distgit/templates/pkgdb_sync_git_branches.py @@ -185,7 +185,10 @@ def branch_package(ns, pkgname, requested_branches, existing_branches): exists = os.path.exists(new_place) if not exists or 'master' not in existing_branches: if not TEST_ONLY: - _invoke(SETUP_PACKAGE, [os.path.join(ns, pkgname)]) + try: + _invoke(SETUP_PACKAGE, [os.path.join(ns, pkgname)]) + except: + return if ns == 'rpms': old_place = os.path.join(GIT_FOLDER, '%s.git' % pkgname) if not os.path.exists(old_place):