summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j25
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2 b/roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2
index 72dacdf93..98eb81fde 100644
--- a/roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2
+++ b/roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2
@@ -502,7 +502,10 @@ def _is_retired_in_pdc(product, project):
pdc_rv = session.get(pdc_url, timeout=30)
if not pdc_rv.ok:
raise RuntimeError("Could not find %r in PDC." % project)
- return not pdc_rv.json()['active']
+ branches = pdc_rv.json()['results']
+ if not branches:
+ raise RuntimeError("No results for %r in PDC." % project)
+ return branches[0]['active']
@cache.cache_on_arguments()