]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/dbconn.py
Convert exception handling to Python3 syntax.
[dak.git] / daklib / dbconn.py
index 637301871a6bf4495036d8a004d7d3d8086f7fa2..4e01b610ce1789acffd9272d8559c34f86542795 100755 (executable)
@@ -818,7 +818,7 @@ class BuildQueue(object):
                     Logger.log(["I: Removing %s from the queue" % o.fullpath])
                     os.unlink(o.fullpath)
                     killdb = True
-            except OSError, e:
+            except OSError as e:
                 # If it wasn't there, don't worry
                 if e.errno == ENOENT:
                     killdb = True
@@ -3684,7 +3684,7 @@ class DBConn(object):
             self.__setuptables()
             self.__setupmappers()
 
-        except OperationalError, e:
+        except OperationalError as e:
             import utils
             utils.fubar("Cannot connect to database (%s)" % str(e))