From: Torsten Werner Date: Fri, 7 Jan 2011 19:27:34 +0000 (+0100) Subject: fix error handling in add_deb_to_db() X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=d9399a7b781e257a0b22e9e0ce1f7f6bb85ab995;p=dak.git fix error handling in add_deb_to_db() Signed-off-by: Torsten Werner --- diff --git a/daklib/dbconn.py b/daklib/dbconn.py index a6878690..80eaa19c 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -57,6 +57,7 @@ from sqlalchemy.orm.exc import NoResultFound # in the database from config import Config from textutils import fix_maintainer +from dak_exceptions import NoSourceFieldError ################################################################################ @@ -2398,7 +2399,7 @@ def add_deb_to_db(u, filename, session=None): bin_sources = get_sources_from_name(entry["source package"], entry["source version"], session=session) if len(bin_sources) != 1: raise NoSourceFieldError, "Unable to find a unique source id for %s (%s), %s, file %s, type %s, signed by %s" % \ - (bin.package, bin.version, bin.architecture.arch_string, + (bin.package, bin.version, entry["architecture"], filename, bin.binarytype, u.pkg.changes["fingerprint"]) bin.source_id = bin_sources[0].source_id