hub: new_build: build in error should be the old one

This commit is contained in:
Yuming Zhu 2023-09-06 20:50:19 +08:00 committed by Tomas Kopecek
parent 503e49bde4
commit 65fb4f47d3

View file

@ -6082,7 +6082,7 @@ def new_build(data, strict=False):
old_binfo = get_build(data)
if old_binfo:
if strict:
raise koji.GenericError('Existing build found: %s' % data)
raise koji.GenericError(f'Existing build found: {old_binfo}')
recycle_build(old_binfo, data)
# Raises exception if there is a problem
return old_binfo['id']