diff --git a/src/geoserver/layer.py b/src/geoserver/layer.py index 75dd79b..6dc9f49 100644 --- a/src/geoserver/layer.py +++ b/src/geoserver/layer.py @@ -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: @@ -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]