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