aboutsummaryrefslogtreecommitdiffstats
path: root/webmap-download
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-04-28 17:19:30 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-04-28 18:02:37 +0200
commitae4de42894153eba76a34e15df7582b2071e66a5 (patch)
treeef069adc51b8ace0979bb4201eb17233cba3a0c1 /webmap-download
parentfab925085c3dd8af710e2c0243e47bc4c9c70ee2 (diff)
webmap-download: Don't fail for sourceless layers.
Cf. for instance svk:transmissionsnatsprojekt. It has an import definition, but no source path/URL for webmap-download to operate on.
Diffstat (limited to 'webmap-download')
-rwxr-xr-xwebmap-download4
1 files changed, 3 insertions, 1 deletions
diff --git a/webmap-download b/webmap-download
index 05aa2c4..087e7fc 100755
--- a/webmap-download
+++ b/webmap-download
@@ -268,7 +268,9 @@ def main() -> NoReturn:
logging.warning('Layer "%s" has no source, ignoring', layername)
continue
for idx, source in enumerate(sources):
- source = source.get('source', None)
+ if 'source' not in source:
+ continue
+ source = source['source']
path = None if source is None else source.get('path', None)
if path is None:
logging.error('Source #%d of layer "%s" has no path, ignoring',