[Zope-Checkins] CVS: Zope/lib/python/ZServer/medusa - monitor.py:1.15.8.1

Tim Peters tim.one at comcast.net
Mon Oct 18 15:33:09 EDT 2004


Update of /cvs-repository/Zope/lib/python/ZServer/medusa
In directory cvs.zope.org:/tmp/cvs-serv26064/lib/python/ZServer/medusa

Modified Files:
      Tag: Zope-2_7-branch
	monitor.py 
Log Message:
Collector 1542:  Python 2.4/Zope 2.8 unittest failure in asyncore.py

medusa's class monitor_server derives from asyncore.dispatcher, but
never called the latter's constructor.  As a result, the ._map attribute
set by 2.4's asyncore.dispatcher.__init__() never gets set, and calling
asyncore methods later dies with an AttributeError on ._map.  The fix
is a 1-liner, adding a call to the base-class constructor.


=== Zope/lib/python/ZServer/medusa/monitor.py 1.15 => 1.15.8.1 ===
--- Zope/lib/python/ZServer/medusa/monitor.py:1.15	Tue Mar 18 16:15:17 2003
+++ Zope/lib/python/ZServer/medusa/monitor.py	Mon Oct 18 15:33:09 2004
@@ -163,6 +163,7 @@
     channel_class = monitor_channel
     
     def __init__ (self, hostname='127.0.0.1', port=8023):
+        asyncore.dispatcher.__init__(self)
         self.hostname = hostname
         self.port = port
         self.create_socket (socket.AF_INET, socket.SOCK_STREAM)



More information about the Zope-Checkins mailing list