[CalendarServer-changes] [5341] CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/ web2/dav

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 17 11:37:35 PDT 2010


Revision: 5341
          http://trac.macosforge.org/projects/calendarserver/changeset/5341
Author:   cdaboo at apple.com
Date:     2010-03-17 11:37:34 -0700 (Wed, 17 Mar 2010)
Log Message:
-----------
Tweak to help tests.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/web2/dav/element/base.py
    CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/web2/dav/xattrprops.py

Modified: CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/web2/dav/element/base.py
===================================================================
--- CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/web2/dav/element/base.py	2010-03-17 18:36:39 UTC (rev 5340)
+++ CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/web2/dav/element/base.py	2010-03-17 18:37:34 UTC (rev 5341)
@@ -219,9 +219,9 @@
         return child in self.children
 
 
-    def writeXML(self, output):
-        output.write("<?xml version='1.0' encoding='UTF-8'?>\n")
-        self.writeToStream(output, "", 0, True)
+    def writeXML(self, output, pretty=True):
+        output.write("<?xml version='1.0' encoding='UTF-8'?>" + ("\n" if pretty else ""))
+        self.writeToStream(output, "", 0, pretty)
 
     
     def writeToStream(self, output, ns, level, pretty):
@@ -294,9 +294,9 @@
 
         output.write(" %s='%s'" % (name, value,))  
       
-    def toxml(self):
+    def toxml(self, pretty=True):
         output = StringIO.StringIO()
-        self.writeXML(output)
+        self.writeXML(output, pretty)
         return str(output.getvalue())
 
     def element(self, document):

Modified: CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/web2/dav/xattrprops.py
===================================================================
--- CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/web2/dav/xattrprops.py	2010-03-17 18:36:39 UTC (rev 5340)
+++ CalendarServer/branches/users/cdaboo/shared-calendars-5187/twext/web2/dav/xattrprops.py	2010-03-17 18:37:34 UTC (rev 5341)
@@ -196,7 +196,7 @@
         @param property: A L{WebDAVElement} to store.
         """
         key = self._encode(property.qname(), uid)
-        value = compress(property.toxml())
+        value = compress(property.toxml(pretty=False))
         untilConcludes(setitem, self.attrs, key, value)
 
         # Update the resource because we've modified it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100317/88900227/attachment.html>


More information about the calendarserver-changes mailing list