X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate1.py;h=0c83377387431f69dd4c615a96f4aef9cccf0a7d;hb=35cd0972b5e14dc8727403e13fccd30776f3ae02;hp=3f0aa8015809b48a56011ba299e67116c61269ce;hpb=2b4d5bf75e28a6b5fa5afbd58defdf661c893033;p=dak.git diff --git a/dak/dakdb/update1.py b/dak/dakdb/update1.py old mode 100644 new mode 100755 index 3f0aa801..0c833773 --- a/dak/dakdb/update1.py +++ b/dak/dakdb/update1.py @@ -1,7 +1,12 @@ #!/usr/bin/env python -# Debian Archive Kit Database Update Script -# 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))