X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate7.py;h=9c3dd1ed6662f4faa8eb2ea5cb5f9515297f0c18;hb=6cc75beccd14c9b39621cb5894d67cec24750405;hp=1c59707857a5d929472e2a170151ce492ac11684;hpb=650634f309b8cd602f4c36ae7f8f4181ea8b7783;p=dak.git diff --git a/dak/dakdb/update7.py b/dak/dakdb/update7.py index 1c597078..9c3dd1ed 100755 --- a/dak/dakdb/update7.py +++ b/dak/dakdb/update7.py @@ -2,11 +2,13 @@ # coding=utf8 """ -Debian Archive Kit Database Update Script -Copyright © 2008 Michael Casadevall -Copyright © 2009 Joerg Jaspert +Moving suite config into DB + +@contact: Debian FTP Master +@copyright: 2008 Michael Casadevall +@copyright: 2009 Joerg Jaspert +@license: GNU General Public License version 2 or later -Debian Archive Kit Database Update Script 7 """ # This program is free software; you can redistribute it and/or modify @@ -48,7 +50,7 @@ def do_update(self): c.execute("ALTER TABLE suite ADD COLUMN untouchable BOOLEAN NOT NULL DEFAULT FALSE;") query = "UPDATE suite SET untouchable = TRUE WHERE suite_name = %s" #: Update query for suite in Cnf.SubTree("Suite").List(): - untouchable = Cnf.Find("Suite::%s::Announce" % (suite)) + untouchable = Cnf.Find("Suite::%s::Untouchable" % (suite)) if not untouchable: continue print "[Untouchable] Processing suite %s" % (suite) @@ -114,6 +116,6 @@ def do_update(self): c.execute("UPDATE config SET value = '7' WHERE name = 'db_revision'") self.db.commit() - except psycopg2.ProgrammingError, msg: + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, "Unable to appy suite config updates, rollback issued. Error message : %s" % (str(msg)) + raise DBUpdateError("Unable to appy suite config updates, rollback issued. Error message : %s" % (str(msg)))