From 40394331ef544a2c143dc2dc64f9e37e2b9c9df4 Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 17 Sep 2021 11:42:56 +0200 Subject: [PATCH] if download fails, don't try to run ffmpeg at all error handling is still not complete: the job is still considered to be "in progress" --- techrec/forge.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/techrec/forge.py b/techrec/forge.py index 4e621b6..d0ca94b 100644 --- a/techrec/forge.py +++ b/techrec/forge.py @@ -121,11 +121,10 @@ async def create_mp3( intervals = [] for begin, start_cut, end_cut in get_files_and_intervals(start, end): try: - file = await get_timefile(begin) + filename = await get_timefile(begin) except Exception as e: - logger.error("Error while retrieving file: %s", e) - else: - intervals.append((file, start_cut, end_cut)) + raise ValueError("Error while retrieving file: %s" % e) from e + intervals.append((filename, start_cut, end_cut)) if os.path.exists(outfile): raise OSError("file '%s' already exists" % outfile) for path, _s, _e in intervals: