Commit b11eabb7 authored by Tim Peters's avatar Tim Peters

Collector 1542: Python 2.4/Zope 2.8 unittest failure in asyncore.py

Forward port form 2.7 branch.

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.
parent 699817df
......@@ -163,6 +163,7 @@ class monitor_server (asyncore.dispatcher):
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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment