Author: cito
Date: Thu Nov  1 07:44:07 2012
New Revision: 462

Log:
We don't need the contextlib in this implementation.

Modified:
   trunk/module/pg.py

Modified: trunk/module/pg.py
==============================================================================
--- trunk/module/pg.py  Thu Nov  1 07:40:55 2012        (r461)
+++ trunk/module/pg.py  Thu Nov  1 07:44:07 2012        (r462)
@@ -29,11 +29,6 @@
 except ImportError:  # Python < 2.4
     pass
 try:
-    from contextlib import contextmanager
-except ImportError:  # Python < 2.5
-    def contextmanager(f):
-        raise NotImplementedError
-try:
     from collections import namedtuple
 except ImportError:  # Python < 2.6
     namedtuple = None
@@ -194,7 +189,7 @@
 
     def __exit__(self, typ, val, tb):
         if self._transaction:
-            self._transaction = None
+            self._transaction = False
             if tb is None:
                 self.commit()
             else:
_______________________________________________
PyGreSQL mailing list
PyGreSQL@Vex.Net
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to