[CalendarServer-changes] [3827] CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/ Twisted/twisted.web2.dav.element.base.patch
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 11 15:43:46 PDT 2009
Revision: 3827
http://trac.macosforge.org/projects/calendarserver/changeset/3827
Author: exarkun at twistedmatrix.com
Date: 2009-03-11 15:43:45 -0700 (Wed, 11 Mar 2009)
Log Message:
-----------
Update to apply cleanly
Modified Paths:
--------------
CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.web2.dav.element.base.patch
Modified: CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.web2.dav.element.base.patch
===================================================================
--- CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.web2.dav.element.base.patch 2009-03-11 22:31:38 UTC (rev 3826)
+++ CalendarServer/branches/exarkun/update-twisted-3816/lib-patches/Twisted/twisted.web2.dav.element.base.patch 2009-03-11 22:43:45 UTC (rev 3827)
@@ -1,8 +1,8 @@
Index: twisted/web2/dav/element/base.py
===================================================================
---- twisted/web2/dav/element/base.py (revision 19773)
+--- twisted/web2/dav/element/base.py (revision 26343)
+++ twisted/web2/dav/element/base.py (working copy)
-@@ -45,7 +45,7 @@
+@@ -46,7 +46,7 @@
]
import string
@@ -11,7 +11,7 @@
import xml.dom.minidom
import datetime
-@@ -90,6 +90,35 @@
+@@ -91,6 +91,35 @@
raise NotImplementedError("WebDAVElement subclass %s is not implemented."
% (self.__class__.__name__,))
@@ -47,7 +47,7 @@
#
# Validate that children are of acceptable types
#
-@@ -102,13 +131,10 @@
+@@ -103,13 +132,10 @@
my_children = []
for child in children:
@@ -63,7 +63,7 @@
for allowed, (min, max) in allowed_children.items():
if type(allowed) == type and isinstance(child, allowed):
-@@ -145,24 +171,26 @@
+@@ -146,24 +172,26 @@
if self.allowed_attributes:
for name in attributes:
@@ -75,7 +75,7 @@
+ if name not in self.allowed_attributes:
+ log.msg("Attribute %s is unexpected in %s element" % (name, self.sname()))
+ my_attributes[name] = attributes[name]
-
+
for name, required in self.allowed_attributes.items():
if required and name not in my_attributes:
raise ValueError("Attribute %s is required in %s element"
@@ -98,7 +98,7 @@
def __str__(self):
return self.sname()
-@@ -190,14 +218,93 @@
+@@ -191,14 +219,93 @@
return child in self.children
def writeXML(self, output):
@@ -196,7 +196,7 @@
def element(self, document):
element = document.createElementNS(self.namespace, self.name)
-@@ -285,6 +392,9 @@
+@@ -286,6 +393,9 @@
self.data = data
@@ -206,7 +206,7 @@
def __str__(self):
return str(self.data)
-@@ -324,6 +434,22 @@
+@@ -325,6 +435,22 @@
log.err("Invalid PCDATA: %r" % (self.data,))
raise
@@ -229,7 +229,7 @@
class WebDAVOneShotElement (WebDAVElement):
"""
Element with exactly one WebDAVEmptyElement child and no attributes.
-@@ -364,6 +490,18 @@
+@@ -365,6 +491,18 @@
PCDATAElement: (0, None),
}
@@ -248,7 +248,7 @@
class WebDAVEmptyElement (WebDAVElement):
"""
WebDAV element with no contents.
-@@ -388,6 +526,7 @@
+@@ -400,6 +538,7 @@
"""
WebDAV element containing PCDATA.
"""
@@ -256,7 +256,7 @@
def fromString(clazz, string):
if string is None:
return clazz()
-@@ -396,8 +535,6 @@
+@@ -408,8 +547,6 @@
else:
return clazz(PCDATAElement(str(string)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090311/576a4fc9/attachment-0001.html>
More information about the calendarserver-changes
mailing list