From d9399a7b781e257a0b22e9e0ce1f7f6bb85ab995 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Fri, 7 Jan 2011 20:27:34 +0100 Subject: [PATCH] fix error handling in add_deb_to_db() Signed-off-by: Torsten Werner --- daklib/dbconn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5