[Zope-dev] zasync/xmlrpclib problem
Florent Guillaume
fg at nuxeo.com
Wed Jun 28 21:43:08 EDT 2006
Gary,
When zasync is used on something that calls a xmlrpclib method
s.foo.bar() (using s = xmlrpclib.ServerProxy(...)) and this xmlrpc
call fails, it seems that cleanFailure at some point calls repr
(s.foo.bar) and this makes a spurious xmlrpc call (because of the
dumb _Method class of xmlrpclib which has a __getattr__ but no
__repr__).
I had to monkey patch xmlrpclib thus, you could probably include it
in zasync:
import xmlrpclib
def xmlrpc_method_repr(self):
return '<xmlrpc._Method %s>' % self._Method__name
xmlrpclib._Method.__repr__ = xmlrpc_method_repr
Florent
--
Florent Guillaume, Nuxeo (Paris, France) Director of R&D
+33 1 40 33 71 59 http://nuxeo.com fg at nuxeo.com
More information about the Zope-Dev
mailing list