Skip to content

Commit

Permalink
Add tarball generation error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Oct 28, 2024
1 parent 23e1b90 commit 66c695b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/shared_config_manager/services.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -192,4 +193,9 @@ 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'\nError:\n%s",
shlex.join(proc.args),
proc.stderr.read() if proc.stderr else "",
)
raise HTTPServerError("Error building the tarball")

0 comments on commit 66c695b

Please sign in to comment.