From e30a6e51a7cc195b44c6d12114d706fb86890fc6 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Fri, 17 Aug 2012 22:44:21 +0200 Subject: [PATCH] sponsor-patch: Don't fall over bugs targetted at the development release (LP: #936014) --- debian/changelog | 2 ++ ubuntutools/sponsor_patch/sponsor_patch.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index 447d371..0874372 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,8 @@ ubuntu-dev-tools (0.144) UNRELEASED; urgency=low - Avoid duplicate Reverse-Build-Deps when sources build binaries of the same name. - Explain that backports aren't to fix bugs. + * sponsor-patch: Don't fall over bugs targetted at the development release + (LP: #936014) [ Benjamin Drung ] * seeded-in-ubuntu: State in error message that it takes a source package. diff --git a/ubuntutools/sponsor_patch/sponsor_patch.py b/ubuntutools/sponsor_patch/sponsor_patch.py index 5e91b06..2642918 100644 --- a/ubuntutools/sponsor_patch/sponsor_patch.py +++ b/ubuntutools/sponsor_patch/sponsor_patch.py @@ -202,6 +202,9 @@ def get_open_ubuntu_bug_task(launchpad, bug, branch=None): tasks = [task for task in ubuntu_tasks if task.get_series() == branch[2] and task.package == branch[3]] + if len(tasks) > 1: + # A bug targetted to the development series? + tasks = [task for task in tasks if task.series is not None] assert len(tasks) == 1 task = tasks[0] elif len(ubuntu_tasks) > 1: