X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate1.py;h=0c83377387431f69dd4c615a96f4aef9cccf0a7d;hb=1e1457bde3318c6605b4c97d4299803fdaf8e774;hp=7778b1be7cfe41fbc9e5b9fc70262674885cd341;hpb=cd5b29ddfd8de263c085f494b9573d683913f6f3;p=dak.git diff --git a/dak/dakdb/update1.py b/dak/dakdb/update1.py index 7778b1be..0c833773 100755 --- a/dak/dakdb/update1.py +++ b/dak/dakdb/update1.py @@ -1,7 +1,12 @@ #!/usr/bin/env python -""" Database Update Script - Saner DM db schema """ -# Copyright (C) 2008 Michael Casadevall +""" +Saner DM db schema + +@contact: Debian FTP Master +@copyright: 2008 Michael Casadevall +@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 @@ -24,7 +29,9 @@ ################################################################################ -import psycopg2, time +import psycopg2 +import time +from daklib.dak_exceptions import DBUpdateError ################################################################################ @@ -59,6 +66,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))