Do not log entire file when singlefile creation fails.

This commit is contained in:
Roland 2024-06-22 10:56:18 -06:00
parent a6647cc8f7
commit 638e92bd4e
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -86,10 +86,10 @@ class ArchiveDownloader(Downloader, ABC):
if not stdout or SINGLEFILE_HEADER.encode() not in stdout[:1000]:
if logs and (stderr := logs.get('stderr')):
e = ChildProcessError(stderr.decode())
e = ChildProcessError(stderr.decode()[:1000])
raise RuntimeError(f'Singlefile created was invalid: {download.url}') from e
if stdout:
e = ChildProcessError(stdout.decode())
e = ChildProcessError(stdout.decode()[:1000])
raise RuntimeError(f'Singlefile created was invalid: {download.url}') from e
raise RuntimeError(f'Singlefile created was invalid: {download.url}')