mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-12 18:12:44 +08:00
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:
committed by
Scott Sanderson
parent
d6e997e96c
commit
1d3a8759bc
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user