X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate17.py;h=493640eb9ff6a79df097a345d17424a5ebbcc1ad;hb=4b758c038852134ec0cee774cd934a9b71cf3d1d;hp=c4e0f2458a9dc5e93bb53928b075c3422079a027;hpb=2cd56ae18c977d13b8676ca60ef9fe85856e71f2;p=dak.git diff --git a/dak/dakdb/update17.py b/dak/dakdb/update17.py old mode 100755 new mode 100644 index c4e0f245..493640eb --- a/dak/dakdb/update17.py +++ b/dak/dakdb/update17.py @@ -52,12 +52,15 @@ def do_update(self): c.execute("""CREATE INDEX ind_bin_contents_binary ON bin_contents(binary_id);""" ) + c.execute("GRANT ALL ON bin_contents TO ftpmaster;") + c.execute("GRANT SELECT ON bin_contents TO public;") c.execute("UPDATE config SET value = '17' WHERE name = 'db_revision'") - self.db.commit() - except psycopg2.ProgrammingError, msg: + self.db.commit() + + except psycopg2.ProgrammingError as msg: self.db.rollback() - raise DBUpdateError, "Unable to apply process-new update 17, rollback issued. Error message : %s" % (str(msg)) + raise DBUpdateError("Unable to apply process-new update 17, rollback issued. Error message : %s" % (str(msg)))