diff options
author | Ralph Bean <rbean@redhat.com> | 2017-08-17 17:19:49 +0000 |
---|---|---|
committer | Ralph Bean <rbean@redhat.com> | 2017-08-17 17:19:49 +0000 |
commit | a54bff964f3450a28bb8347b03acc98573f188bf (patch) | |
tree | 097ded978edaaf4dc8bb0e47cb7d8815162a2d54 | |
parent | 69c915f7cb12ced5b9e5daff7e4b63f15c25f72c (diff) | |
download | ansible-a54bff964f3450a28bb8347b03acc98573f188bf.tar.gz ansible-a54bff964f3450a28bb8347b03acc98573f188bf.tar.xz ansible-a54bff964f3450a28bb8347b03acc98573f188bf.zip |
Make sure to correctly escape package names, like atari++.
-rw-r--r-- | roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2 | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2 b/roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2 index 98eb81fde..db9f5bc04 100644 --- a/roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2 +++ b/roles/distgit/pagure/templates/pagure-sync-bugzilla.py.j2 @@ -494,12 +494,15 @@ def _is_retired_in_pdc(product, project): lead = PRODUCTS_TO_LEAD_BRANCH[product] type = PDC_TYPES[project['namespace']] name = project['name'] - pdc_url = '{0}/component-branches/?global_component={1}&type={2}&name={3}'\ - .format(PDCURL.rstrip('/'), name, type, lead) - + pdc_url = '{0}/component-branches/'.format(PDCURL.rstrip('/')) + params = dict( + global_component=name, + type=type, + name=lead, + ) if DRY_RUN: - print('Querying {0}'.format(pdc_url)) - pdc_rv = session.get(pdc_url, timeout=30) + print('Querying {0} {1}'.format(pdc_url, params)) + pdc_rv = session.get(pdc_url, params=params, timeout=30) if not pdc_rv.ok: raise RuntimeError("Could not find %r in PDC." % project) branches = pdc_rv.json()['results'] |