Skip to content

Commit 422a36b

Browse files
Guillaume TroupelAlessio Fabiani
Guillaume Troupel
and
Alessio Fabiani
authored
fix python 3.9+ incompatibility (#19)
* fix python 3.9+ incompatibility #18 * python 3.9+ Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it>
1 parent 762f7c9 commit 422a36b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/geoserver/layer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def resource(self):
134134
if self.dom is None:
135135
self.fetch()
136136
name = self.dom.find("resource/name").text
137-
atom_link = [n for n in self.dom.find("resource").getchildren() if 'href' in n.attrib]
137+
atom_link = [n for n in self.dom.find("resource") if 'href' in n.attrib]
138138
ws_name = workspace_from_url(atom_link[0].get('href'))
139139
if self.gs_version >= "2.13":
140140
if ":" in name:
@@ -158,7 +158,7 @@ def _resolve_style(self, element):
158158
else:
159159
style_name = element.find('name').text
160160
ws_name = None
161-
atom_link = [n for n in element.getchildren() if 'href' in n.attrib]
161+
atom_link = [n for n in element if 'href' in n.attrib]
162162
if atom_link and ws_name is None:
163163
ws_name = workspace_from_url(atom_link[0].get("href"))
164164
return self.catalog.get_styles(names=style_name, workspaces=ws_name)[0]

0 commit comments

Comments
 (0)