From ae02ce10c4dbc392d86afb207135038dc557be49 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 23 2020 10:14:00 +0000 Subject: Encode the project name before querying PDC for it Turns out with python3 we need to encode the project name as otherwise PDC is not able to give us back the appropriate data. Fixes https://pagure.io/releng/issue/9615 Signed-off-by: Pierre-Yves Chibon --- diff --git a/dist_git_auth.py b/dist_git_auth.py index d28bdd5..04678fd 100644 --- a/dist_git_auth.py +++ b/dist_git_auth.py @@ -16,6 +16,7 @@ from __future__ import print_function import logging import re import os +import urllib.parse import requests @@ -94,8 +95,9 @@ class DistGitAuth(GitAuthHelper): "modules": "module", "container": "container", } + name = urllib.parse.quote(project.name) resp = requests.get( - f"{self.pdc_url}component-branches/?global_component={project.name}" + f"{self.pdc_url}component-branches/?global_component={name}" f"&name={refname}&type={namespace2pdctype[project.namespace]}&fields=active" )