Commit 2eede254 authored by Toby Dickenson's avatar Toby Dickenson

merged toby-xmlrpclib099-branch. Changed ZPublisher xmlrpc support to allow...

merged toby-xmlrpclib099-branch. Changed ZPublisher xmlrpc support to allow published methods to return None nested inside a data structure
parent 87909446
...@@ -100,8 +100,9 @@ class Response: ...@@ -100,8 +100,9 @@ class Response:
# Marshall our body as an XML-RPC response. Strings will be sent # Marshall our body as an XML-RPC response. Strings will be sent
# strings, integers as integers, etc. We do *not* convert # strings, integers as integers, etc. We do *not* convert
# everything to a string first. # everything to a string first.
if body is None: # Previously this had special handling if the response
body=xmlrpclib.False # Argh, XML-RPC doesn't handle null # was a Python None. This is now patched in xmlrpclib to
# allow Nones nested inside data structures too.
try: try:
body = xmlrpclib.dumps((body,), methodresponse=1) body = xmlrpclib.dumps((body,), methodresponse=1)
except: except:
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment