From 8e1199ccac07bf44e28201ccaf1d606295a3f900 Mon Sep 17 00:00:00 2001 From: Joachim Ungar Date: Wed, 11 Sep 2024 08:38:30 +0200 Subject: [PATCH] adapt to Fiona changing error messages --- mapchete/io/vector.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mapchete/io/vector.py b/mapchete/io/vector.py index 559c4dda..e2593ce9 100644 --- a/mapchete/io/vector.py +++ b/mapchete/io/vector.py @@ -76,7 +76,9 @@ def fiona_read(path, mode="r", **kwargs): ): if i in str(repr(exc)): raise FileNotFoundError(f"path {str(path)} does not exist") - else: # pragma: no cover + else: + if not path.exists(): + raise FileNotFoundError(f"path {str(path)} does not exist") raise