This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients rhettinger
Date 2011-11-13.21:00:28
SpamBayes Score 0.00999546
Marked as misclassified No
Message-id <>
Currently, an XMLRPC client communicating with a server running Python can make Python style calls but exceptions get collapsed into a standard FaultException making it difficult to program in a Pythonic style:

proxy = xmlrpc.client.ServerProxy("http://localhost:8000/")
    value = proxy.lookup('somekey')
except xmlrpc.client.Fault as err:
    if err.faultCode == 1 and 'KeyError' in err.faultString:
        k =":.(\w+)' not found$", err.faultString).groups(1)
        raise KeyError(k)
It would be better if we could do this automatically (search for a pure python exception of the same name and raise it instead of a Fault):

proxy = xmlrpc.client.ServerProxy("http://localhost:8000/", python_exceptions=True)

   value = proxy.lookup('somekey')
except KeyError as e:
Date User Action Args
2011-11-13 21:00:30rhettingersetrecipients: + rhettinger
2011-11-13 21:00:30rhettingersetmessageid: <>
2011-11-13 21:00:28rhettingerlinkissue13397 messages
2011-11-13 21:00:28rhettingercreate