kojid: more meaningful error message

Fixes: https://pagure.io/koji/issue/2414
This commit is contained in:
Tomas Kopecek 2020-08-03 15:40:56 +02:00
parent dba936e21a
commit 94b06f272e

View file

@ -6339,7 +6339,13 @@ class WaitrepoTask(BaseTaskHandler):
last_repo = None
while True:
taginfo = self.session.getTag(tag, strict=True)
try:
taginfo = self.session.getTag(tag, strict=True)
except koji.GenericError:
self.logger.debug("Tag %s got lost while waiting for newrepo", tag)
raise koji.GenericError("Unsuccessfully waited %s for %s repo. "
"Tag was probably deleted meanwhile." %
(koji.util.duration(start), tag))
repo = self.session.getRepo(taginfo['id'])
if repo and repo != last_repo:
if builds: