[Zope-Checkins] SVN: Zope/trunk/src/ZPublisher/xmlrpc.py Retain support for marhalling DateTime objects via xmlrpc

Hanno Schlichting hannosch at hannosch.eu
Sun May 8 10:48:23 EDT 2011


Log message for revision 121602:
  Retain support for marhalling DateTime objects via xmlrpc
  

Changed:
  U   Zope/trunk/src/ZPublisher/xmlrpc.py

-=-
Modified: Zope/trunk/src/ZPublisher/xmlrpc.py
===================================================================
--- Zope/trunk/src/ZPublisher/xmlrpc.py	2011-05-08 14:36:36 UTC (rev 121601)
+++ Zope/trunk/src/ZPublisher/xmlrpc.py	2011-05-08 14:48:23 UTC (rev 121602)
@@ -31,7 +31,7 @@
 # Make DateTime.DateTime marshallable via XML-RPC
 # http://www.zope.org/Collectors/Zope/2109
 from DateTime.DateTime import DateTime
-WRAPPERS = xmlrpclib.WRAPPERS + (DateTime,)
+WRAPPERS = xmlrpclib.WRAPPERS + (DateTime, )
 
 def dump_instance(self, value, write):
     # Check for special wrappers
@@ -49,7 +49,9 @@
         self.dump_struct(value, write)
 
 xmlrpclib.Marshaller.dispatch[types.InstanceType] = dump_instance
+xmlrpclib.Marshaller.dispatch[DateTime] = dump_instance
 
+
 def parse_input(data):
     """Parse input data and return a method path and argument tuple
 



More information about the Zope-Checkins mailing list