kojiwrapper: Add retries to login call

The gssapi_login call is not retried automatically by Koji yet (see
koji#3170). Let's try to work around that by retrying in the calling
code.

JIRA: RHELCMP-8700
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2022-03-29 09:50:59 +02:00 committed by lsedlar
parent bebbefe46e
commit f8c7ad28e4
1 changed files with 3 additions and 0 deletions

View File

@ -65,6 +65,9 @@ class KojiWrapper(object):
self.koji_module.config.server, session_opts
)
# This retry should be removed once https://pagure.io/koji/issue/3170 is
# fixed and released.
@util.retry(wait_on=(xmlrpclib.ProtocolError, koji.GenericError))
def login(self):
"""Authenticate to the hub."""
auth_type = self.koji_module.config.authtype