diff --git a/debian/changelog b/debian/changelog index 1ca0bb9..5da5c1c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. diff --git a/requestbackport b/requestbackport index 555610d..e660f51 100755 --- a/requestbackport +++ b/requestbackport @@ -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",