You are looking at the representation of the Fault
object; the string message itself is contained in the .faultString
attribute:
print fault.faultString
The __repr__
of the Fault class otherwise represents that value using repr()
; you cannot get around that without changing the xmlrpclib.Fault
class itself (by replacing it's __repr__
method or adding a __str__
method to it).
You could monkey patch that into the class:
from xmlrpclib import Fault
def fault_repr(self):
return "<Fault %s: %s>" % (self.faultCode, self.faultString)
Fault.__repr__ = fault_repr