On the server side of a xmlrpc
server in python I have the following line of code within a function overwriting SimpleXMLRPCServer._marshaled_dispatch
:
response = xmlrpclib.dumps(
xmlrpclib.Fault(1, "some error\nnext line\n"),
encoding=self.encoding, allow_none=self.allow_none)
to create some custom error/fault message to be show on the client side. However, this code will show something like the following on the client side
xmlrpclib.Fault: <Fault 1: "some error\nnext line\n">
whereas I want to have something like
xmlrpclib.Fault: <Fault 1: "some error
next line
">
i.e. where the newline character is actually 'used' and not printed.
Any ideas I can accomplish this (per server side, i.e. modification of the line just shown above, and without using a third party package.)?