[CalendarServer-changes] [10647] CalendarServer/trunk/twext/who/xml.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Feb 4 15:23:59 PST 2013
Revision: 10647
http://trac.calendarserver.org//changeset/10647
Author: wsanchez at apple.com
Date: 2013-02-04 15:23:59 -0800 (Mon, 04 Feb 2013)
Log Message:
-----------
DirectoryRecord.ElementClass -> DirectoryRecord.element
DirectoryRecord.AttributeClass -> DirectoryRecord.attribute
DirectoryRecord.ValueClass -> DirectoryRecord.value
Modified Paths:
--------------
CalendarServer/trunk/twext/who/xml.py
Modified: CalendarServer/trunk/twext/who/xml.py
===================================================================
--- CalendarServer/trunk/twext/who/xml.py 2013-02-04 23:19:04 UTC (rev 10646)
+++ CalendarServer/trunk/twext/who/xml.py 2013-02-04 23:23:59 UTC (rev 10647)
@@ -122,9 +122,9 @@
fieldName = MergedConstants(BaseFieldName, FieldName)
- ElementClass = Element
- AttributeClass = Attribute
- ValueClass = Value
+ element = Element
+ attribute = Attribute
+ value = Value
indexedFields = (
BaseFieldName.recordType,
@@ -203,13 +203,13 @@
# Pull data from DOM
#
directoryNode = etree.getroot()
- if directoryNode.tag != self.ElementClass.directory.value:
+ if directoryNode.tag != self.element.directory.value:
raise DirectoryServiceError("Incorrect root element: %s" % (directoryNode.tag,))
def getAttribute(node, name):
return node.get(name, "").encode("utf-8")
- realmName = getAttribute(directoryNode, self.AttributeClass.realm.value)
+ realmName = getAttribute(directoryNode, self.attribute.realm.value)
if not realmName:
raise DirectoryServiceError("No realm name.")
@@ -221,10 +221,10 @@
records = set()
for recordNode in directoryNode.getchildren():
- recordTypeAttribute = getAttribute(recordNode, self.AttributeClass.recordType.value)
+ recordTypeAttribute = getAttribute(recordNode, self.attribute.recordType.value)
if recordTypeAttribute:
try:
- recordType = self.ValueClass.lookupByValue(recordTypeAttribute).recordType
+ recordType = self.value.lookupByValue(recordTypeAttribute).recordType
except (ValueError, AttributeError):
unknownRecordTypes.add(recordTypeAttribute)
continue
@@ -236,7 +236,7 @@
for fieldNode in recordNode.getchildren():
try:
- fieldElement = self.ElementClass.lookupByValue(fieldNode.tag)
+ fieldElement = self.element.lookupByValue(fieldNode.tag)
except ValueError:
unknownFieldElements.add(fieldNode.tag)
continue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130204/331f4a6b/attachment-0001.html>
More information about the calendarserver-changes
mailing list