From: Ansgar Burchardt Date: Tue, 7 May 2013 06:25:23 +0000 (+0200) Subject: dak/process_new.py: fix handling binary-only NEW uploads X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=3daf09a3ae217db18250ffdd264191557661ffda;p=dak.git dak/process_new.py: fix handling binary-only NEW uploads For a binary-only (buildd) upload that ends in NEW, upload.source is None. So we have to get the source package name from somewhere else. --- diff --git a/dak/process_new.py b/dak/process_new.py index 92104435..4b0d5c36 100755 --- a/dak/process_new.py +++ b/dak/process_new.py @@ -126,6 +126,7 @@ def takenover_binaries(upload, missing, session): if m['type'] != 'dsc': binaries.remove(m['package']) if binaries: + source = binaries[0].source.source suite = upload.target_suite.overridesuite or \ upload.target_suite.suite_name suites = [s[0] for s in session.query(Suite.suite_name).filter \ @@ -134,7 +135,7 @@ def takenover_binaries(upload, missing, session): rows = session.query(DBSource.source, DBBinary.package).distinct(). \ filter(DBBinary.package.in_(binaries)). \ join(DBBinary.source). \ - filter(DBSource.source != upload.source.source). \ + filter(DBSource.source != source). \ join(DBBinary.suites). \ filter(Suite.suite_name.in_(suites)). \ order_by(DBSource.source, DBBinary.package).all()