X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate42.py;h=3c51232c8735a98540208eba39a1ed4e715f4611;hb=e2c4fd7f21c3b33cd7192bded5d6373e0ee90374;hp=8e8f7c5644a5d49b7ef510d8915193837ac6ce89;hpb=8c3f7c7e616ed05b2974eb875072c099b337c3b7;p=dak.git diff --git a/dak/dakdb/update42.py b/dak/dakdb/update42.py index 8e8f7c56..3c51232c 100755 --- a/dak/dakdb/update42.py +++ b/dak/dakdb/update42.py @@ -39,11 +39,11 @@ def do_update(self): c = self.db.cursor() c.execute("ALTER TABLE suite ADD COLUMN butautomaticupgrades BOOLEAN NOT NULL DEFAULT FALSE;") - c.execute("ALTER TABLE suite ADD CONSTRAINT bau_needs_na_set CHECK (not butautomaticupgrades or notautomatic):") + c.execute("ALTER TABLE suite ADD CONSTRAINT bau_needs_na_set CHECK (not butautomaticupgrades or notautomatic);") c.execute("UPDATE config SET value = '42' WHERE name = 'db_revision'") self.db.commit() - except psycopg2.ProgrammingError, msg: + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, 'Unable to apply update 42, rollback issued. Error message : %s' % (str(msg)) + raise DBUpdateError('Unable to apply update 42, rollback issued. Error message : %s' % (str(msg)))