]> git.decadent.org.uk Git - dak.git/blobdiff - dak/dakdb/update17.py
Python modules should not be executable
[dak.git] / dak / dakdb / update17.py
old mode 100755 (executable)
new mode 100644 (file)
index c4e0f24..493640e
@@ -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)))