[CalendarServer-changes] [1654] CalendarServer/trunk/lib-patches/Twisted

source_changes at macosforge.org source_changes at macosforge.org
Mon Jul 9 11:44:14 PDT 2007


Revision: 1654
          http://trac.macosforge.org/projects/calendarserver/changeset/1654
Author:   cdaboo at apple.com
Date:     2007-07-09 11:44:14 -0700 (Mon, 09 Jul 2007)

Log Message:
-----------
Use an existing class for one-off "unknown elements" to avoid class object memory leak.

Added Paths:
-----------
    CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.http.patch
    CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch

Added: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.http.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.http.patch	                        (rev 0)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.http.patch	2007-07-09 18:44:14 UTC (rev 1654)
@@ -0,0 +1,18 @@
+Index: twisted/web2/dav/http.py
+===================================================================
+--- twisted/web2/dav/http.py	(revision 19773)
++++ twisted/web2/dav/http.py	(working copy)
+@@ -69,10 +69,9 @@
+         """
+         if type(error) is tuple:
+             xml_namespace, xml_name = error
+-            class EmptyError (davxml.WebDAVEmptyElement):
+-                namespace = xml_namespace
+-                name      = xml_name
+-            error = EmptyError()
++            error = davxml.WebDAVUnknownElement()
++            error.namespace = xml_namespace
++            error.name = xml_name
+ 
+         output = davxml.Error(error).toxml()
+ 

Added: CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch
===================================================================
--- CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch	                        (rev 0)
+++ CalendarServer/trunk/lib-patches/Twisted/twisted.web2.dav.method.propfind.patch	2007-07-09 18:44:14 UTC (rev 1654)
@@ -0,0 +1,16 @@
+Index: twisted/web2/dav/method/propfind.py
+===================================================================
+--- twisted/web2/dav/method/propfind.py	(revision 19773)
++++ twisted/web2/dav/method/propfind.py	(working copy)
+@@ -200,7 +200,7 @@
+ 
+ def propertyName(name):
+     property_namespace, property_name = name
+-    class PropertyName (davxml.WebDAVEmptyElement):
+-        namespace = property_namespace
+-        name = property_name
+-    return PropertyName()
++    pname = davxml.WebDAVUnknownElement()
++    pname.namespace = property_namespace
++    pname.name = property_name
++    return pname

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070709/804f5b0c/attachment.html


More information about the calendarserver-changes mailing list