]> git.decadent.org.uk Git - dak.git/blobdiff - dak/dakdb/update4.py
Convert exception handling to Python3 syntax.
[dak.git] / dak / dakdb / update4.py
index 88f8f86730848dd895090a63b94d162664866739..169653fa4397caa7f4fd9e89b67b873553c419f7 100755 (executable)
@@ -1,12 +1,10 @@
 #!/usr/bin/env python
-
 """
-Database Update Script - Get suite_architectures table use sane values
+Get suite_architectures table use sane values
 
 @contact: Debian FTP Master <ftpmaster@debian.org>
 @copyright: 2009  Joerg Jaspert <joerg@debian.org>
 @license: GNU General Public License version 2 or later
-
 """
 
 # This program is free software; you can redistribute it and/or modify
@@ -62,8 +60,10 @@ def do_update(self):
             for arch in architectures:
                 c.execute(query, [suites[suite], archs[arch]])
 
+        c.execute("UPDATE config SET value = '4' WHERE name = 'db_revision'")
+
         self.db.commit()
 
-    except psycopg2.ProgrammingError, msg:
+    except psycopg2.ProgrammingError as msg:
         self.db.rollback()
         raise DBUpdateError, "Unable to apply sanity to suite_architecture table, rollback issued. Error message : %s" % (str(msg))