diff options
author | Pierre-Yves Chibon <pingou@pingoured.fr> | 2017-08-17 11:00:55 +0200 |
---|---|---|
committer | Pierre-Yves Chibon <pingou@pingoured.fr> | 2017-08-17 11:03:40 +0200 |
commit | a0c61406f09548827f400154df39bff67f5a75c7 (patch) | |
tree | a24a685432028c48a0e6996d451638ec79529d94 | |
parent | 4a4ad044f89321fb829d575a4ced1e8e42a4e97c (diff) | |
download | ansible-a0c61406f09548827f400154df39bff67f5a75c7.tar.gz ansible-a0c61406f09548827f400154df39bff67f5a75c7.tar.xz ansible-a0c61406f09548827f400154df39bff67f5a75c7.zip |
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
-rw-r--r-- | roles/distgit/templates/pkgdb_sync_git_branches.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/distgit/templates/pkgdb_sync_git_branches.py b/roles/distgit/templates/pkgdb_sync_git_branches.py index d84a1b1ec..a2b5c407c 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): |