X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate5.py;h=7c892a7a0e1fc51acc4bcc7a7b21a04c4650245a;hb=27e00376e81d1c37ff327ee0d39670b266418869;hp=beb961cc3c58d669f0a17f0723e94f758f9897db;hpb=ec44bcc3b4bbeb7a389dda77f39ff54436d1b181;p=dak.git diff --git a/dak/dakdb/update5.py b/dak/dakdb/update5.py index beb961cc..7c892a7a 100755 --- 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))