[Zodb-checkins] CVS: Zope3/src/zodb/zeo/zrpc - client.py:1.4

Guido van Rossum guido@python.org
Mon, 3 Mar 2003 12:59:54 -0500


Update of /cvs-repository/Zope3/src/zodb/zeo/zrpc
In directory cvs.zope.org:/tmp/cvs-serv15364

Modified Files:
	client.py 
Log Message:
Fix a bug in _create_wrappers() according to a suggestion by Barry
Pederson.  The 'wrap' local variable was reused in a way that
overwrote the value intended to set the return dictionary.


=== Zope3/src/zodb/zeo/zrpc/client.py 1.3 => 1.4 ===
--- Zope3/src/zodb/zeo/zrpc/client.py:1.3	Wed Feb  5 18:28:20 2003
+++ Zope3/src/zodb/zeo/zrpc/client.py	Mon Mar  3 12:59:53 2003
@@ -335,10 +335,9 @@
             wrap = ConnectWrapper(domain, addr, self.mgr, self.client)
             wrap.connect_procedure()
             if wrap.state == "notified":
-                for wrap in wrappers.keys():
-                    wrap.close()
-                wrappers[wrap] = wrap
-                return wrappers
+                for w in wrappers.keys():
+                    w.close()
+                return {wrap: wrap}
             if wrap.state != "closed":
                 wrappers[wrap] = wrap
         return wrappers