Skip to content

Commit

Permalink
Do not crash if a default repository is not reachable anymore
Browse files Browse the repository at this point in the history
Related PR upstream: qgis/QGIS-Resources#45
  • Loading branch information
Guts committed Sep 5, 2022
1 parent b3246c9 commit c73d78c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions qgis_resource_sharing/repository_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,16 @@ def load_directories(self):
LOGGER.warning(nameWarn)
break
if not repo_present:
self.add_directory(
online_dir_name, self._online_directories[online_dir_name]
)
try:
self.add_directory(
online_dir_name, self._online_directories[online_dir_name]
)
except Exception as exc:
LOGGER.error(
f"Error occured adding '{online_dir_name}' repository. Trace: {exc}"
)
continue

for repo_name in settings.childGroups():
self._directories[repo_name] = {}
url = settings.value(repo_name + "/url", "", type=str)
Expand Down

0 comments on commit c73d78c

Please sign in to comment.