[CalendarServer-changes] [11350] CalendarServer/branches/users/glyph/warning-cleanups/twistedcaldav/ directory/xmlaccountsparser.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jun 13 16:21:06 PDT 2013
Revision: 11350
http://trac.calendarserver.org//changeset/11350
Author: glyph at apple.com
Date: 2013-06-13 16:21:06 -0700 (Thu, 13 Jun 2013)
Log Message:
-----------
.getchildren() is deprecated; just iterate over the node.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/warning-cleanups/twistedcaldav/directory/xmlaccountsparser.py
Modified: CalendarServer/branches/users/glyph/warning-cleanups/twistedcaldav/directory/xmlaccountsparser.py
===================================================================
--- CalendarServer/branches/users/glyph/warning-cleanups/twistedcaldav/directory/xmlaccountsparser.py 2013-06-13 23:21:05 UTC (rev 11349)
+++ CalendarServer/branches/users/glyph/warning-cleanups/twistedcaldav/directory/xmlaccountsparser.py 2013-06-13 23:21:06 UTC (rev 11350)
@@ -107,7 +107,7 @@
if item is not None:
item.groups.add(group.shortNames[0])
- for child in node.getchildren():
+ for child in node:
try:
recordType = RECORD_TYPES[child.tag]
except KeyError:
@@ -235,7 +235,7 @@
return result
def parseXML(self, node):
- for child in node.getchildren():
+ for child in node:
if child.tag == ELEMENT_SHORTNAME:
self.shortNames.append(child.text.encode("utf-8"))
elif child.tag == ELEMENT_GUID:
@@ -263,11 +263,11 @@
self.shortNames.append(self.guid)
def _parseMembers(self, node, addto):
- for child in node.getchildren():
+ for child in node:
if child.tag == ELEMENT_MEMBER:
recordType = child.get(ATTRIBUTE_RECORDTYPE, DirectoryService.recordType_users)
addto.add((recordType, child.text.encode("utf-8")))
def _parseExtras(self, node, addto):
- for child in node.getchildren():
+ for child in node:
addto[child.tag] = child.text.encode("utf-8")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130613/0d51ecf8/attachment-0001.html>
More information about the calendarserver-changes
mailing list