]> git.decadent.org.uk Git - dak.git/blobdiff - dak/dakdb/update1.py
Convert exception handling to Python3 syntax.
[dak.git] / dak / dakdb / update1.py
index ff2b62ee453eb99faaf2d8f1c1bb8d5e7f20fae4..ede12e56c949315ccd3790d7d212cae455569be5 100755 (executable)
@@ -1,7 +1,12 @@
 #!/usr/bin/env python
 
-""" Database Update Script - Saner DM db schema """
-# Copyright (C) 2008  Michael Casadevall <mcasadevall@debian.org>
+"""
+Saner DM db schema
+
+@contact: Debian FTP Master <ftpmaster@debian.org>
+@copyright: 2008  Michael Casadevall <mcasadevall@debian.org>
+@license: GNU General Public License version 2 or later
+"""
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -59,6 +64,6 @@ def do_update(self):
         print "Pausing for five seconds ..."
         time.sleep (5)
 
-    except psycopg2.ProgrammingError, msg:
+    except psycopg2.ProgrammingError as msg:
         self.db.rollback()
-        raise DBUpdateError, "Unable to appy DM table updates, rollback issued. Error message : %s" % (str(msg)
+        raise DBUpdateError, "Unable to appy DM table updates, rollback issued. Error message : %s" % (str(msg))