X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fdakdb%2Fupdate17.py;h=493640eb9ff6a79df097a345d17424a5ebbcc1ad;hb=6cfc82886d71c7436a97ddfe7a5a1dde297886d2;hp=d75bdb5b2575beb2686659c7f46389d4d72008c9;hpb=93ac1a954fd6bda0ff9deca37f6c8b0db3944255;p=dak.git diff --git a/dak/dakdb/update17.py b/dak/dakdb/update17.py index d75bdb5b..493640eb 100755 --- 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: + 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)))