mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-17 11:51:29 +00:00
Handle exceptions on retry
The "can be retried" value from launchpad may have been cached. Avoid an exception when we race someone else retrying a build.
This commit is contained in:
parent
6ebffe3f4a
commit
3df40f6392
@ -377,8 +377,12 @@ def main():
|
|||||||
if args.retry and build.can_be_retried:
|
if args.retry and build.can_be_retried:
|
||||||
Logger.info("Retrying build of %s on %s...",
|
Logger.info("Retrying build of %s on %s...",
|
||||||
build.source_package_name, build.arch_tag)
|
build.source_package_name, build.arch_tag)
|
||||||
build.retry()
|
try:
|
||||||
retry_count += 1
|
build.retry()
|
||||||
|
retry_count += 1
|
||||||
|
except lazr.restfulclient.errors.BadRequest:
|
||||||
|
Logger.info("Failed to retry build of %s on %s",
|
||||||
|
build.source_package_name, build.arch_tag)
|
||||||
|
|
||||||
if args.priority and can_rescore:
|
if args.priority and can_rescore:
|
||||||
if build.can_be_rescored:
|
if build.can_be_rescored:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user