Author: darcy
Date: Sat Nov  7 14:37:11 2015
New Revision: 523

Log:
Use modern exception handling.  Makes it ready for Python 3.

Modified:
   trunk/module/pgdb.py

Modified: trunk/module/pgdb.py
==============================================================================
--- trunk/module/pgdb.py        Mon Aug  3 16:11:53 2015        (r522)
+++ trunk/module/pgdb.py        Sat Nov  7 14:37:11 2015        (r523)
@@ -353,9 +353,9 @@
                     self.rowcount = -1
         except DatabaseError:
             raise
-        except Error, err:
+        except Error as err:
             raise _db_error("error '%s' in '%s'" % (err, sql))
-        except Exception, err:
+        except Exception as err:
             raise _op_error("internal error in '%s': %s" % (sql, err))
         # then initialize result raw count and description
         if self._src.resulttype == RESULT_DQL:
@@ -402,7 +402,7 @@
             result = self._src.fetch(size)
         except DatabaseError:
             raise
-        except Error, err:
+        except Error as err:
             raise _db_error(str(err))
         row_factory = self.row_factory
         typecast = self._type_cache.typecast
_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to