Skip to content

Commit

Permalink
get_children deprecated in ElementTree
Browse files Browse the repository at this point in the history
fixes deprecation warnings from element tree using getchildren method.
  • Loading branch information
stuross committed Jul 12, 2013
1 parent ae58183 commit c9716f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions allauth/socialaccount/providers/linkedin/views.py
Expand Up @@ -27,12 +27,12 @@ def to_dict(self, xml):
Convert XML structure to dict recursively, repeated keys
entries are returned as in list containers.
"""
children = xml.getchildren()
children = list(xml)
if not children:
return xml.text
else:
out = {}
for node in xml.getchildren():
for node in list(xml):
if node.tag in out:
if not isinstance(out[node.tag], list):
out[node.tag] = [out[node.tag]]
Expand Down

0 comments on commit c9716f0

Please sign in to comment.