diff --git a/scripts/gdal_helper.py b/scripts/gdal_helper.py index ce674cc60..f6ae26f3c 100644 --- a/scripts/gdal_helper.py +++ b/scripts/gdal_helper.py @@ -57,17 +57,11 @@ def run_gdal(command: List[str], input_file: str = "", output_file: str = "") -> if output_file: command.append(output_file) - try: get_log().debug("run_gdal", command=command_to_string(command)) - proc = subprocess.run( - command, - env=gdal_env, - check=True, - capture_output=True, - ) + proc = subprocess.run(command, env=gdal_env, check=True, capture_output=True) except subprocess.CalledProcessError as cpe: - get_log().error("run_gdal_failed", command=command_to_string(command)) + get_log().error("run_gdal_failed", command=command_to_string(command), error=str(cpe.stderr, "utf-8")) raise cpe get_log().debug("run_gdal_translate_succeded", command=command_to_string(command))