X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate2.py;h=0d9d387162fa45a9f0e23ae2ab1ab07fd86a352d;hb=5fab292532bd8d1a4b041c137393b33031841f95;hp=10407a9c510ce7daa38405b1c165c014025b00be;hpb=9f371390bb90395b2f2f0b65c91c21047896774a;p=dak.git diff --git a/dak/dakdb/update2.py b/dak/dakdb/update2.py old mode 100755 new mode 100644 index 10407a9c..0d9d3871 --- 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 @@ -28,13 +33,11 @@ from daklib.dak_exceptions import DBUpdateError ################################################################################ def do_update(self): -vvvvvvvvvvvvvvvvvvvv print "Note: to be able to enable the the PL/Perl (plperl) procedural language, we do" print "need postgresql-plperl-$postgres-version installed. Make sure that this is the" print "case before you continue. Interrupt if it isn't, sleeping 5 seconds now." print "(We need to be database superuser for this to work!)" time.sleep (5) -^^^^^^^^^^^^^^^^^^^^ try: c = self.db.cursor() @@ -393,6 +396,6 @@ $$ self.db.commit() - except psycopg2.ProgrammingError, msg: + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, "Unable to appy debversion updates, rollback issued. Error message : %s" % (str(msg)) + raise DBUpdateError("Unable to appy debversion updates, rollback issued. Error message : %s" % (str(msg)))