From: Mike O'Connor Date: Fri, 13 Mar 2009 19:28:41 +0000 (-0400) Subject: handle unable to scan contents with a dak exception X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bb2ccf4b89fa3310af4bdc68d8aac0e7147c42d;p=dak handle unable to scan contents with a dak exception Signed-off-by: Mike O'Connor --- diff --git a/dak/process_accepted.py b/dak/process_accepted.py index 64679c13..3d97473f 100755 --- a/dak/process_accepted.py +++ b/dak/process_accepted.py @@ -390,8 +390,11 @@ def install (): suite_id = database.get_suite_id(suite) projectB.query("INSERT INTO bin_associations (suite, bin) VALUES (%d, currval('binaries_id_seq'))" % (suite_id)) - if not database.copy_temporary_contents(package, version, filename, reject): - reject("Missing contents for package") + if not database.copy_temporary_contents(package, version, newfile, reject): + print "REJECT\n" + reject_message, + projectB.query("COMMIT WORK") + raise MissingContents, "No contents stored for package %s, and couldn't determine contents of %s" % (package, newfile ) + orig_tar_id = Upload.pkg.orig_tar_id orig_tar_location = Upload.pkg.orig_tar_location diff --git a/daklib/dak_exceptions.py b/daklib/dak_exceptions.py index 33fa5ad3..ccd63e50 100755 --- a/daklib/dak_exceptions.py +++ b/daklib/dak_exceptions.py @@ -58,6 +58,7 @@ dakerrors = { "NoFreeFilenameError": """Exception raised when no alternate filename was found.""", "TransitionsError": """Exception raised when transitions file can't be parsed.""", "NoSourceFieldError": """Exception raised - we cant find the source - wtf?""", + "MissingContents": """Exception raised - we could not determine contents for this deb""", "DBUpdateError": """Exception raised - could not update the database""", "ChangesUnicodeError": """Exception raised - changes file not properly utf-8 encoded""" } #: All dak exceptions