From 4618ec194dfd630d874dc14c51262a980d689d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Mon, 28 Oct 2024 09:37:56 +0100 Subject: [PATCH] Add tarball generation error message --- app/shared_config_manager/services.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/shared_config_manager/services.py b/app/shared_config_manager/services.py index 45bf666d..c9f118f3 100644 --- a/app/shared_config_manager/services.py +++ b/app/shared_config_manager/services.py @@ -1,7 +1,8 @@ import logging import os.path import re -import subprocess +import shlex +import subprocess # nosec from collections.abc import Iterable from typing import Any, Optional, Union, cast @@ -192,4 +193,8 @@ def _proc_iter(proc: subprocess.Popen[bytes]) -> Iterable[Union[bytes, Any]]: break yield block if proc.wait() != 0: + _LOG.error( + "Error building the tarball with '%s'", + shlex.join(proc.args), # type: ignore[arg-type] + ) raise HTTPServerError("Error building the tarball")