X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate4.py;h=a6456bea8095c7dd557f0a92854fa1ea5df42cb5;hb=edf9c774f7d5b0148a30fd63bf1fa6bddf68d478;hp=1a9d9c3a4c6168deec277aa70d9ecede41b4c349;hpb=dade1d4e91245074ff31a9c8e79fb2ea5b942c51;p=dak.git diff --git a/dak/dakdb/update4.py b/dak/dakdb/update4.py index 1a9d9c3a..a6456bea 100644 --- a/dak/dakdb/update4.py +++ b/dak/dakdb/update4.py @@ -1,6 +1,6 @@ #!/usr/bin/env python """ -Database Update Script - Get suite_architectures table use sane values +Get suite_architectures table use sane values @contact: Debian FTP Master @copyright: 2009 Joerg Jaspert @@ -53,9 +53,9 @@ def do_update(self): for suite in s: suites[suite[1]]=suite[0] - for suite in Cnf.SubTree("Suite").List(): + for suite in Cnf.subtree("Suite").list(): print "Processing suite %s" % (suite) - architectures = Cnf.SubTree("Suite::" + suite).ValueList("Architectures") + architectures = Cnf.subtree("Suite::" + suite).value_list("Architectures") suite = suite.lower() for arch in architectures: c.execute(query, [suites[suite], archs[arch]]) @@ -64,6 +64,6 @@ def do_update(self): self.db.commit() - except psycopg2.ProgrammingError, msg: + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, "Unable to apply sanity to suite_architecture table, rollback issued. Error message : %s" % (str(msg)) + raise DBUpdateError("Unable to apply sanity to suite_architecture table, rollback issued. Error message : %s" % (str(msg)))