[CalendarServer-changes] [12529] twext/trunk/twext/who/xml.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:15:45 PDT 2014
Revision: 12529
http://trac.calendarserver.org//changeset/12529
Author: wsanchez at apple.com
Date: 2014-01-31 17:27:21 -0800 (Fri, 31 Jan 2014)
Log Message:
-----------
Handle constants.
Modified Paths:
--------------
twext/trunk/twext/who/xml.py
Modified: twext/trunk/twext/who/xml.py
===================================================================
--- twext/trunk/twext/who/xml.py 2014-02-01 01:22:05 UTC (rev 12528)
+++ twext/trunk/twext/who/xml.py 2014-02-01 01:27:21 UTC (rev 12529)
@@ -347,8 +347,10 @@
)
elif valueType is NamedConstant:
- raise NotImplementedError("named constant")
+ constantElement = self._constantElement(fieldNode)
+ value = constantElement.constantValue
+
else:
raise AssertionError(
"Unknown value type {0} for field {1}".format(
@@ -377,12 +379,14 @@
def _constantElement(self, node):
"""
- Find the name of the single empty node in a given node.
+ Find the element name of the single empty node (eg. C{<foo />}) in a
+ given node.
@param node: a node
@type node: L{XMLElement}
- @return: L{unicode}
+ @return: The element name for the found node.
+ @rtype: L{Element}
"""
child = None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/c6fb79f3/attachment.html>
More information about the calendarserver-changes
mailing list