asyncore.dispatch_with_send bug

Alexandre Fayolle alf at leo.logilab.fr
Thu Jul 12 13:28:46 EDT 2001


Hello,

I think there's a bug in asyncore.dispatcher_with_send. The accesses
to self.out_buffer in this class cause errors because of the 
__getattr__ method inherited from dispatcher, causing tracebacks such as

  File "/home/alf/Narval/narval/services/SocketManager.py", line 118, in _run
    loop(timeout=60,use_poll=0)
  File "/usr/lib/python2.1/asyncore.py", line 193, in loop
    poll_fun (timeout, map)
  File "/usr/lib/python2.1/asyncore.py", line 84, in poll
    if obj.writable():
  File "/usr/lib/python2.1/asyncore.py", line 452, in writable
    return (not self.connected) or len(self.out_buffer)
  File "/usr/lib/python2.1/asyncore.py", line 357, in __getattr__
    return getattr (self.socket, attr)
AttributeError: out_buffer


Am I right, or am I misunderstanding the code ?

Alexandre Fayolle
-- 
LOGILAB, Paris (France).
http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org
Narval, the first software agent available as free software (GPL).



More information about the Python-list mailing list