From 34a11f74fc211e57ef36bc33e9a8c06cb114154e Mon Sep 17 00:00:00 2001 From: Eric Duminil <eric.duminil@gmail.com> Date: Sat, 19 Oct 2024 21:22:57 +0200 Subject: [PATCH] Show error message if RegionChooser fails --- download_files_from_LGL_BW.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/download_files_from_LGL_BW.py b/download_files_from_LGL_BW.py index f4a67f4..7906530 100644 --- a/download_files_from_LGL_BW.py +++ b/download_files_from_LGL_BW.py @@ -151,11 +151,13 @@ def extract_region(output_dir: Path, location_name: str, wkt: str) -> None: f'@{params_path}' ], text=True, - capture_output=True, - check=True + capture_output=True ) if (result.stderr): + print("\n") print(result.stderr) + if result.returncode != 0: + raise ValueError(f"RegionChooser failed with code {result.returncode}") print(" DONE!") -- GitLab