[Checkins] SVN: relstorage/trunk/relstorage/adapters/oracle.py Fixed connection error handling in open_for_store

Shane Hathaway shane at hathawaymix.org
Thu Sep 24 04:23:45 EDT 2009


Log message for revision 104474:
  Fixed connection error handling in open_for_store

Changed:
  U   relstorage/trunk/relstorage/adapters/oracle.py

-=-
Modified: relstorage/trunk/relstorage/adapters/oracle.py
===================================================================
--- relstorage/trunk/relstorage/adapters/oracle.py	2009-09-24 07:56:59 UTC (rev 104473)
+++ relstorage/trunk/relstorage/adapters/oracle.py	2009-09-24 08:23:44 UTC (rev 104474)
@@ -289,12 +289,13 @@
 
         Returns (conn, cursor).
         """
+        if self._twophase:
+            conn, cursor = self.open(transaction_mode=None, twophase=True)
+        else:
+            conn, cursor = self.open()
         try:
             if self._twophase:
-                conn, cursor = self.open(transaction_mode=None, twophase=True)
                 self._set_xid(conn, cursor)
-            else:
-                conn, cursor = self.open()
             if self.on_store_opened is not None:
                 self.on_store_opened(cursor, restart=False)
             return conn, cursor



More information about the checkins mailing list