Skip to content

Commit 625e0b3

Browse files
committed
Don't fail if GetTranslations results cannot be parsed
I.e. if the qwc-qgis-server get_translations plugin is not installed
1 parent a87bff6 commit 625e0b3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/config_generator/capabilities_reader.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -643,16 +643,12 @@ def read_project_translations(self, service_name, viewer_languages):
643643
}
644644
document = self.fetch_cached(full_url, params, "GetTranslations_" + language, "GetTranslations " + language, True)
645645
if not document:
646-
return {}
646+
continue
647647
all_translations[language] = json.loads(document)
648648
if all_translations[language]:
649649
self.logger.info("Read " + language + " translations for " + service_name)
650650

651651
except Exception as e:
652-
self.logger.error(
653-
"Could not parse GetTranslations from %s:\n%s" %
654-
(full_url, e)
655-
)
656-
self.logger.debug(traceback.format_exc())
652+
continue
657653

658654
return all_translations

0 commit comments

Comments
 (0)