X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate1.py;h=ff2b62ee453eb99faaf2d8f1c1bb8d5e7f20fae4;hb=c48b357e4838eac6de79b0bd6ee5f8862d049dba;hp=7778b1be7cfe41fbc9e5b9fc70262674885cd341;hpb=aee7aab6e3431514f8612664cf5725d1862686b0;p=dak.git diff --git a/dak/dakdb/update1.py b/dak/dakdb/update1.py index 7778b1be..ff2b62ee 100755 --- a/dak/dakdb/update1.py +++ b/dak/dakdb/update1.py @@ -24,7 +24,9 @@ ################################################################################ -import psycopg2, time +import psycopg2 +import time +from daklib.dak_exceptions import DBUpdateError ################################################################################ @@ -59,6 +61,4 @@ def do_update(self): except psycopg2.ProgrammingError, msg: self.db.rollback() - print "FATAL: Unable to apply DM table update 1!" - print "Error Message: " + str(msg) - print "Database changes have been rolled back." + raise DBUpdateError, "Unable to appy DM table updates, rollback issued. Error message : %s" % (str(msg)