From db584d9fdcd5e916c3b276932b65d0e2ee594f60 Mon Sep 17 00:00:00 2001 From: Ivo De Decker Date: Fri, 7 Dec 2018 22:50:04 +0000 Subject: [PATCH] Don't calculate smoothbins for sources not in unstable When building the excuses, don't calculate smoothbins if the source is not in unstable. Doing so would result in a KeyError and a crash. This happens for sources that are in testing and (testing-)proposed-updates, but not in unstable. Signed-off-by: Ivo De Decker --- britney.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/britney.py b/britney.py index 6c15905..5253a72 100755 --- a/britney.py +++ b/britney.py @@ -1295,12 +1295,14 @@ class Britney(object): # removing binary packages primary_source_suite = self.suite_info.primary_source_suite if not (ssrc and source_suite is not primary_source_suite): - # for every binary package produced by this source in testing for this architecture - _, _, smoothbins, _ = self._compute_groups(src, - primary_source_suite, - arch, - False) + smoothbins = set() + if src in primary_source_suite.sources: + _, _, smoothbins, _ = self._compute_groups(src, + primary_source_suite, + arch, + False) + # for every binary package produced by this source in testing for this architecture for pkg_id in sorted(x for x in source_t.binaries if x.architecture == arch): pkg = pkg_id.package_name # if the package is architecture-independent, then ignore it