Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #29 from hghwng/master
Browse files Browse the repository at this point in the history
Remove deprecated lxml API invocation
  • Loading branch information
grst authored Feb 21, 2021
2 parents 15134a3 + 73d34ba commit d8f01db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geos/mapsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def parse_xml_boundary(xml_region):
"""
try:
bounds = {}
for boundary in xml_region.getchildren():
for boundary in xml_region:
bounds[boundary.tag] = float(boundary.text)
bbox = GeographicBB(min_lon=bounds["west"], max_lon=bounds["east"],
min_lat=bounds["south"], max_lat=bounds["north"])
Expand All @@ -236,7 +236,7 @@ def parse_xml_layers(xml_layers):
"""
layers = []
for custom_map_source in xml_layers.getchildren():
for custom_map_source in xml_layers:
layers.append(MapSource.parse_xml_layer(custom_map_source))
return layers

Expand Down Expand Up @@ -310,7 +310,7 @@ def from_xml(xml_path, mapsource_prefix=""):
bbox = None
layers = None

for elem in xmldoc.getchildren():
for elem in xmldoc:
if elem.tag == 'id':
map_id = elem.text
elif elem.tag == 'name':
Expand Down

0 comments on commit d8f01db

Please sign in to comment.