X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate2.py;h=2e3cb446b55f1cedb985628f17524caa1520964b;hb=80bfccee962f87de3a79b6182546ac03beba6dbb;hp=71b43fa701ccd73caab555e9e878097ad4a15e24;hpb=81d0c91b0d085b66aa40a9e147698f618b825d62;p=dak.git diff --git a/dak/dakdb/update2.py b/dak/dakdb/update2.py index 71b43fa7..2e3cb446 100755 --- a/dak/dakdb/update2.py +++ b/dak/dakdb/update2.py @@ -1,9 +1,14 @@ #!/usr/bin/env python # coding=utf8 -""" Database Update Script - debversion """ -# Copyright © 2008 Michael Casadevall -# Copyright © 2008 Roger Leigh +""" +debversion + +@contact: Debian FTP Master +@copyright: 2008 Michael Casadevall +@copyright: 2008 Roger Leigh +@license: GNU General Public License version 2 or later +""" # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,7 +26,9 @@ ################################################################################ -import psycopg2, time +import psycopg2 +import time +from daklib.dak_exceptions import DBUpdateError ################################################################################ @@ -391,6 +398,4 @@ $$ except psycopg2.ProgrammingError, msg: self.db.rollback() - print "FATAL: Unable to apply debversion table update 2!" - print "Error Message: " + str(msg) - print "Database changes have been rolled back." + raise DBUpdateError, "Unable to appy debversion updates, rollback issued. Error message : %s" % (str(msg))