X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate33.py;h=5b0fe110d4dab1dad30ecf27c575d85ccd6db12a;hb=e5cad663b24aafea82b1229558dabdbba399faa1;hp=5c0b3f41202872274b1356d36413bbbac998bcb6;hpb=076d0a9a0f88c8e86fc206b491f73ea6e8c71fa0;p=dak.git diff --git a/dak/dakdb/update33.py b/dak/dakdb/update33.py index 5c0b3f41..5b0fe110 100644 --- a/dak/dakdb/update33.py +++ b/dak/dakdb/update33.py @@ -43,13 +43,13 @@ def do_update(self): c.execute('CREATE TABLE changelogs_text (id serial PRIMARY KEY NOT NULL, changelog text)') c.execute("GRANT SELECT ON changelogs_text TO public") c.execute("GRANT ALL ON changelogs_text TO ftpmaster") - c.execute('CREATE VIEW changelogs AS SELECT cl.id, source, version, architecture, changelog \ + c.execute('CREATE VIEW changelogs AS SELECT cl.id, source, CAST(version AS debversion), architecture, changelog \ FROM changes c JOIN changelogs_text cl ON cl.id = c.changelog_id') c.execute("GRANT SELECT ON changelogs TO public") c.execute("GRANT ALL ON changelogs TO ftpmaster") c.execute("UPDATE config SET value = '33' WHERE name = 'db_revision'") self.db.commit() - except psycopg2.ProgrammingError, msg: + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, 'Unable to apply build_queue update 33, rollback issued. Error message : %s' % (str(msg)) + raise DBUpdateError('Unable to apply build_queue update 33, rollback issued. Error message : %s' % (str(msg)))