requestbackport: Error out nicely when a tracking project doens't exist.

LP: #1852901
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
Mattia Rizzolo 2019-11-21 16:20:02 +01:00
parent c7b2149e1a
commit 463d1f63a8
No known key found for this signature in database
GPG Key ID: 0816B9E18C762BAD
2 changed files with 10 additions and 1 deletions

2
debian/changelog vendored
View File

@ -3,6 +3,8 @@ ubuntu-dev-tools (0.175) UNRELEASED; urgency=medium
[ Mattia Rizzolo ]
* Trust the installed debian-keyring when checking validity of dsc
signatures.
* requestbackport:
+ Error out nicely when a tracking project doens't exist. LP: #1852901
[ Stefano Rivera ]
* merge-changelog: rewrite the changelog handling to use python3-debian.

View File

@ -90,7 +90,14 @@ def check_existing(package, destinations):
query = re.findall(r'[a-z]+', package)
bugs = []
for release in destinations:
project = Launchpad.projects[release + '-backports']
project_name = '{}-backports'.format(release)
try:
project = Launchpad.projects[project_name]
except KeyError:
Logger.error("The backports tracking project '%s' doesn't seem to "
"exist. Please check the situation with the "
"backports team.", project_name)
sys.exit(1)
bugs += project.searchTasks(omit_duplicates=True,
search_text=query,
status=["Incomplete", "New", "Confirmed",