MAINT: Remove use of deprecated getchildren method on xml element

Rather than calling getchildren on xml.etree.ElementTree elements,
we're now supposed to just itegrate over the elements.
This commit is contained in:
Jonathan Kamens
2014-10-02 14:12:55 -04:00
committed by Scott Sanderson
parent d6e997e96c
commit 1d3a8759bc
+1 -2
View File
@@ -119,8 +119,7 @@ http://data.treasury.gov/feed.svc/DailyTreasuryYieldCurveRateData\
if tag == "entry":
properties = element.find(properties_xpath[0])
datum = {get_localname(node): node.text
for node in properties.getchildren()
if ET.iselement(node)}
for node in properties if ET.iselement(node)}
# clear the element after we've dealt with it:
element.clear()
yield datum