[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - xmlrpc.py:1.15.62.4

Shane Hathaway shane at zope.com
Tue Jan 20 15:30:53 EST 2004


Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv20517/ZPublisher

Modified Files:
      Tag: Zope-2_7-branch
	xmlrpc.py 
Log Message:
Removed xmlrpclib, deferring to the version in the Python standard library.

xmlrpclib in Python 2.3+ includes support for nil values and basic auth, so
Zope no longer needs to provide its own version.


=== Zope/lib/python/ZPublisher/xmlrpc.py 1.15.62.3 => 1.15.62.4 ===
--- Zope/lib/python/ZPublisher/xmlrpc.py:1.15.62.3	Sun Jan 11 16:48:21 2004
+++ Zope/lib/python/ZPublisher/xmlrpc.py	Tue Jan 20 15:30:22 2004
@@ -98,7 +98,7 @@
     def setBody(self, body, title='', is_error=0, bogus_str_search=None):
         if isinstance(body, xmlrpclib.Fault):
             # Convert Fault object to XML-RPC response.
-            body=xmlrpclib.dumps(body, methodresponse=1)
+            body=xmlrpclib.dumps(body, methodresponse=1, allow_none=True)
         else:
             if type(body) == types.InstanceType:
                 # Avoid disclosing private members. Private members are
@@ -117,7 +117,8 @@
             # was a Python None. This is now patched in xmlrpclib to
             # allow Nones nested inside data structures too.
             try:
-                body = xmlrpclib.dumps((body,), methodresponse=1)
+                body = xmlrpclib.dumps(
+                    (body,), methodresponse=1, allow_none=True)
             except:
                 self.exception()
                 return




More information about the Zope-Checkins mailing list