Skip to content

Commit

Permalink
fix python 3.9+ incompatibility (#19)
Browse files Browse the repository at this point in the history
* fix python 3.9+ incompatibility

#18

* python 3.9+

Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it>
  • Loading branch information
Guillaume Troupel and Alessio Fabiani authored Nov 10, 2021
1 parent 762f7c9 commit 422a36b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/geoserver/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def resource(self):
if self.dom is None:
self.fetch()
name = self.dom.find("resource/name").text
atom_link = [n for n in self.dom.find("resource").getchildren() if 'href' in n.attrib]
atom_link = [n for n in self.dom.find("resource") if 'href' in n.attrib]
ws_name = workspace_from_url(atom_link[0].get('href'))
if self.gs_version >= "2.13":
if ":" in name:
Expand All @@ -158,7 +158,7 @@ def _resolve_style(self, element):
else:
style_name = element.find('name').text
ws_name = None
atom_link = [n for n in element.getchildren() if 'href' in n.attrib]
atom_link = [n for n in element if 'href' in n.attrib]
if atom_link and ws_name is None:
ws_name = workspace_from_url(atom_link[0].get("href"))
return self.catalog.get_styles(names=style_name, workspaces=ws_name)[0]
Expand Down

0 comments on commit 422a36b

Please sign in to comment.