[Zodb-checkins] CVS: ZEO/ZEO - ClientStorage.py:1.26.4.22

Jeremy Hylton jeremy@zope.com
Thu, 20 Dec 2001 13:18:33 -0500


Update of /cvs-repository/ZEO/ZEO
In directory cvs.zope.org:/tmp/cvs-serv26817/ZEO

Modified Files:
      Tag: ZEO-ZRPC-Dev
	ClientStorage.py 
Log Message:
Fix supportsTrasactionalUndo() in case where storage server hasn't
even heard of TransactionalUndo.

Fix close() for case where client is not currently connected.



=== ZEO/ZEO/ClientStorage.py 1.26.4.21 => 1.26.4.22 ===
 
     def supportsTransactionalUndo(self):
-        return self._info['supportsTransactionalUndo']
+        try:
+            return self._info['supportsTransactionalUndo']
+        except KeyError:
+            return 0
 
     def _check_trans(self, trans, exc=None):
         if self._transaction is not trans:
@@ -319,7 +322,8 @@
         # Close the manager first, so that it doesn't attempt to
         # re-open the connection. 
         self._rpc_mgr.close()
-        self._server.rpc.close()
+        if self._server:
+            self._server.rpc.close()
         
     def commitVersion(self, src, dest, transaction):
         self._check_trans(transaction,