How to Catch Errors in SimpleXMLRPCServer
gregpinero at gmail.com
gregpinero at gmail.com
Thu Sep 27 20:01:57 EDT 2007
On Sep 27, 5:08 pm, "Jeff McNeil" <j... at jmcneil.net> wrote:
> Yeah, that code was out of memory and I didn't test it, my apologies.
> Need to actually return a value from _dispatch.
>
> class MyCalls(object):
> def _dispatch(self, method, args):
> try:
> return getattr(self, method)(*args)
> except:
> handle_logging()
>
> server = SimpleXMLRPCServer(("localhost", 8000))
> server.register_instance(MyCalls())
> server.serve_forever()
>
Thanks, that works. I'm not sure why I didn't notice it wasn't
returning anything.
-Greg
More information about the Python-list
mailing list