Asyncore

N

Neil Benn

Hello,

I was wondering if someone could provide assistance. I'm
writing a thin wrapper around asyncore for compatibility with a common
Comms API that I use.

class (SocketComms(_AbstractComms, dispatcher)

I have a class which extends dispatcher and adds in a few things more.
However when I call the connect method (this is simplified to remove any
influence that my class may have) using the following:

self.connect(('127.0.0.1', 1025))

I get an error where getattr is being called recursively :

File "h:\CeLMA\Automation\Comms\CommsImpl.py", line 624, in open
self.connect(('127.0.0.1', 1025))
File "c:\program files\python23\lib\asyncore.py", line 307, in connect
err = self.socket.connect_ex(address)
File "c:\program files\python23\lib\asyncore.py", line 365, in __getattr__
return getattr(self.socket, attr)
File "c:\program files\python23\lib\asyncore.py", line 365, in __getattr__
return getattr(self.socket, attr)
File "c:\program files\python23\lib\asyncore.py", line 365, in __getattr__
return getattr(self.socket, attr)
*<snip a few hundred lines>
* File "c:\program files\python23\lib\asyncore.py", line 365, in
__getattr__
return getattr(self.socket, attr)
RuntimeError: maximum recursion depth exceeded

Looking at this it seems like in asyncore self.socket is itself a
dispatcher. None of the classes in _AbstractComms are using getattr and
neither do they define a socket method, attribute, property or pink
elephant!

Has anyone seen this before? If you have please could you provide
me with some pointers as to what the issue could be?

Cheers,

Neil
**

--

Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 47
D-01307
Dresden
Germany

Tel : +49 (0)351 4173 154
e-mail : (e-mail address removed)
Cenix Website : http://www.cenix-bioscience.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top