Skip to content
Permalink
Browse files

.getchildren() is deprecated; just iterate over the node.

  • Loading branch information...
glyph committed Jun 13, 2013
1 parent cdbb2d4 commit ddcfa9818a091157b1fb544ce25ae50fa605b2a4
Showing with 4 additions and 4 deletions.
  1. +4 −4 twistedcaldav/directory/xmlaccountsparser.py
@@ -107,7 +107,7 @@ def updateMembership(group):
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 @@ def expand(text, ctr):
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 @@ def parseXML(self, node):
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")

0 comments on commit ddcfa98

Please sign in to comment.
You can’t perform that action at this time.