type(xmlrpclib.Fault.faultCode)...

Magnus Lie Hetland mlh at vier.idi.ntnu.no
Fri May 10 11:21:37 EDT 2002


In article <slrnadnji4.dl0.mlh at vier.idi.ntnu.no>, Magnus Lie Hetland wrote:
>

I found the problem myself... I looked in SimpleXMLRPCServer, and it
turns out that it turns every exception x into a Fault with faultCode
1 (an int, not a string, as the xmlrpclib docs say... Not sure what
the deal is here) and faultCode str(x). When I raise Fault objects of
my own, this gives a the highly undesirable behaviour of constructing
a _new_ Fault object which ignores my faultCode and which ends up with
a pretty odd faultString.

If I can neither return Faults as Faults nor raise custom Faults -- is
there any way one can use custom Faults with SimpleXMLRPCServer?

If not, is there any interest in a patch that would allow this? Are
there any suggested workarounds? Am I missing something?

--
Magnus Lie Hetland                                  The Anygui Project
http://hetland.org                                  http://anygui.org



More information about the Python-list mailing list