Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wmts] Check that we've got a file path before attempting to parse it #84

Merged
merged 2 commits into from
May 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[wmts] Check that we've got a file path before attempting to parse it
  • Loading branch information
gacarrillor committed May 21, 2024
commit 4f13a856493d463ee8b466f05dc722dd1f1bf11d
4 changes: 2 additions & 2 deletions swiss_locator/core/filters/swiss_locator_filter_wmts.py
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ def __init__(self, iface: QgisInterface = None, crs: str = None, capabilities=No

self.info(self.content.status())

if self.content.status() == QgsFetchedContent.ContentStatus.Finished:
if self.content.status() == QgsFetchedContent.ContentStatus.Finished and self.content.filePath():
file_path = self.content.filePath()
self.info(
f"Swisstopo capabilities already downloaded. Reading from {file_path}"
@@ -91,7 +91,7 @@ def prefix(self):
return "chw"

def handle_capabilities_response(self):
if self.content.status() == QgsFetchedContent.ContentStatus.Finished:
if self.content.status() == QgsFetchedContent.ContentStatus.Finished and self.content.filePath():
gacarrillor marked this conversation as resolved.
Show resolved Hide resolved
self.info(
f"Swisstopo capabilities has been downloaded. Reading from {self.content.filePath()}"
)