提交 d9399a7b 编写于 作者: T Torsten Werner

fix error handling in add_deb_to_db()

Signed-off-by: NTorsten Werner <twerner@debian.org>
上级 609325aa
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册