From f7771422135de770c640ec581646dc71aca09c94 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 10 Jun 2024 19:06:10 +0200 Subject: webmap-import: Don't try to set description if it is unset in config.yml. --- webmap-import | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'webmap-import') 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: -- cgit v1.2.3