Put the failing ffmpeg command on its own line in error messages

This commit is contained in:
2026-08-11 05:31:30 +00:00
parent 69d58f99e3
commit e678c8c267
+2 -2
View File
@@ -260,10 +260,10 @@ def _image_via_ffmpeg(path: Path, maxsize: int, quality: int) -> bytes:
stderr = (e.stderr or b"").decode(errors="replace").strip()
if stderr:
raise RuntimeError(
f"ffmpeg failed (exit {e.returncode}): {shell_cmd}\n{stderr}"
f"ffmpeg failed (exit {e.returncode}):\n{shell_cmd}\n{stderr}"
) from e
raise RuntimeError(
f"ffmpeg failed (exit {e.returncode}): {shell_cmd}"
f"ffmpeg failed (exit {e.returncode}):\n{shell_cmd}"
) from e
with Path(tmp_path).open("rb") as f:
return f.read()