diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2024-06-10 19:06:10 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2024-06-10 20:31:28 +0200 |
commit | f7771422135de770c640ec581646dc71aca09c94 (patch) | |
tree | 98f952b9ae4320300d7074a386f85ba9cb170b8b /webmap-import | |
parent | 69a2c335a560e7683646eadbafaa48f9fba0d82c (diff) |
webmap-import: Don't try to set description if it is unset in config.yml.
Diffstat (limited to 'webmap-import')
-rwxr-xr-x | webmap-import | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/webmap-import b/webmap-import index a3ffd50..5515dd0 100755 --- a/webmap-import +++ b/webmap-import @@ -981,7 +981,8 @@ if __name__ == '__main__': # clear non-empty output layer clearLayer(dso, lyr) - if lyr.SetMetadataItem('DESCRIPTION', layerdef.get('description', '')) != GDAL_CE_None: + description = layerdef.get('description', None) + if description is not None and lyr.SetMetadataItem('DESCRIPTION', description) != GDAL_CE_None: logging.warning('Could not set description metadata') for source in sources: |