X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate5.py;h=a42e540cdabd01dc10c4f453fc5105fa2a2ecce0;hb=34f75c943f8d60104f7a1c9cff89f311390a33ee;hp=beb961cc3c58d669f0a17f0723e94f758f9897db;hpb=ec44bcc3b4bbeb7a389dda77f39ff54436d1b181;p=dak.git diff --git a/dak/dakdb/update5.py b/dak/dakdb/update5.py old mode 100755 new mode 100644 index beb961cc..a42e540c --- a/dak/dakdb/update5.py +++ b/dak/dakdb/update5.py @@ -36,7 +36,6 @@ def do_update(self): print "Fixing bin_assoc_by_arch view" try: c = self.db.cursor() - c.execute("DROP VIEW bin_assoc_by_arch") c.execute("""CREATE OR REPLACE VIEW bin_assoc_by_arch AS SELECT ba.suite, ba.bin, a.id AS arch @@ -47,6 +46,6 @@ def do_update(self): self.db.commit() - except psycopg2.ProgrammingError, msg: + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, "Unable to recreate bin_assoc_by_arch view, rollback issued. Error message : %s" % (str(msg)) + raise DBUpdateError("Unable to recreate bin_assoc_by_arch view, rollback issued. Error message : %s" % (str(msg)))