X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate12.py;h=21d44a4598103ddc54b2912eb616660f6de74fd4;hb=7db3402aa3615137ec7eb58bd3ba7ac662381d0f;hp=70a9e18e41df11ef751afeb523b61cbc97438c9f;hpb=35cd0972b5e14dc8727403e13fccd30776f3ae02;p=dak.git diff --git a/dak/dakdb/update12.py b/dak/dakdb/update12.py old mode 100755 new mode 100644 index 70a9e18e..21d44a45 --- a/dak/dakdb/update12.py +++ b/dak/dakdb/update12.py @@ -30,6 +30,7 @@ Adding a date field to the process-new notes import psycopg2 import time +from daklib.dak_exceptions import DBUpdateError ################################################################################ @@ -43,6 +44,6 @@ def do_update(self): c.execute("UPDATE config SET value = '12' WHERE name = 'db_revision'") self.db.commit() - except psycopg2.ProgrammingError, msg: + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, "Unable to apply process-new update 12, rollback issued. Error message : %s" % (str(msg)) + raise DBUpdateError("Unable to apply process-new update 12, rollback issued. Error message : %s" % (str(msg)))