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

Hanno Schlichting <[email protected]>
Newsgroups gmane.comp.web.zope.cvs
Message-ID <20110508144823.F22F7940C9__46309.4290382743$1304866112$gmane$org@cvs.zope.org>
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
 

_______________________________________________
Zope-Checkins maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.