]> git.decadent.org.uk Git - dak.git/blobdiff - dak/dakdb/update20.py
Update, jessie 8.1
[dak.git] / dak / dakdb / update20.py
old mode 100755 (executable)
new mode 100644 (file)
index f4e34cb..0e8ac9d
@@ -59,7 +59,7 @@ def do_update(self):
             c.execute("UPDATE queue SET path = %s WHERE id = %s", (dir, row[0]))
 
         print "Adding missing queues to the queue table"
-        for q in cnf.SubTree("Dir::Queue").keys():
+        for q in cnf.subtree("Dir::Queue").keys():
             qname = q.lower()
             if qname in seenqueues.keys():
                 continue
@@ -95,6 +95,6 @@ def do_update(self):
         c.execute("UPDATE config SET value = '20' WHERE name = 'db_revision'")
         self.db.commit()
 
-    except psycopg2.InternalError, msg:
+    except psycopg2.InternalError as msg:
         self.db.rollback()
-        raise DBUpdateError, "Unable to apply debversion update 20, rollback issued. Error message : %s" % (str(msg))
+        raise DBUpdateError("Unable to apply debversion update 20, rollback issued. Error message : %s" % (str(msg)))