[syncpackage] Within fetch_source_pkg, do not exit(1) on an error or exception, simply return None so we can continue to the next package.

This commit is contained in:
Simon Quigley 2025-03-01 11:17:02 -06:00
parent 162e758671
commit 86a83bf74d
2 changed files with 7 additions and 3 deletions

2
debian/changelog vendored
View File

@ -2,6 +2,8 @@ ubuntu-dev-tools (0.205) UNRELEASED; urgency=medium
* [syncpackage] When syncing multiple packages, if one of the packages is in
the sync blocklist, do not exit, simply continue.
* [syncpackage] Within fetch_source_pkg, do not exit(1) on an error or
exception, simply return None so we can continue to the next package.
-- Simon Quigley <tsimonq2@debian.org> Sat, 01 Mar 2025 11:10:56 -0600

View File

@ -295,7 +295,7 @@ def fetch_source_pkg(package, dist, version, component, ubuntu_release, mirror):
udtexceptions.SeriesNotFoundException,
) as e:
Logger.error(str(e))
sys.exit(1)
return None
if version is None:
version = Version(debian_srcpkg.getVersion())
try:
@ -306,7 +306,7 @@ def fetch_source_pkg(package, dist, version, component, ubuntu_release, mirror):
ubuntu_version = Version("~")
except udtexceptions.SeriesNotFoundException as e:
Logger.error(str(e))
sys.exit(1)
return None
if ubuntu_version >= version:
# The LP importer is maybe out of date
debian_srcpkg = requestsync_mail_get_debian_srcpkg(package, dist)
@ -320,7 +320,7 @@ def fetch_source_pkg(package, dist, version, component, ubuntu_release, mirror):
ubuntu_version,
ubuntu_release,
)
sys.exit(1)
return None
if component is None:
component = debian_srcpkg.getComponent()
@ -712,6 +712,8 @@ def main():
args.release,
args.debian_mirror,
)
if not src_pkg:
continue
blacklisted, comments = is_blacklisted(src_pkg.source)
blacklist_fail = False