Skip to content

Commit

Permalink
[wmts] Log error message if there were troubles downloading capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
gacarrillor committed May 22, 2024
1 parent 4f13a85 commit 9703a2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions swiss_locator/core/filters/swiss_locator_filter_wmts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from qgis.gui import QgisInterface
from qgis.core import (
Qgis,
QgsApplication,
QgsBlockingNetworkRequest,
QgsFetchedContent,
Expand Down Expand Up @@ -96,6 +97,11 @@ def handle_capabilities_response(self):
f"Swisstopo capabilities has been downloaded. Reading from {self.content.filePath()}"
)
self.capabilities = ET.parse(self.content.filePath()).getroot()
else:
self.info(
"The Swiss Locator filter for WMTS layers could not fetch capabilities",
Qgis.Critical
)

def perform_fetch_results(self, search: str, feedback: QgsFeedback):
namespaces = {
Expand Down

0 comments on commit 9703a2d

Please sign in to comment.