From d49c7dff0094516bad7c0c21aa771cc3370397c8 Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 17 Sep 2021 10:43:49 +0200 Subject: [PATCH] fix the exception handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit we ♥ when exceptions create more exceptions --- techrec/forge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/techrec/forge.py b/techrec/forge.py index 6c27818..a492dc3 100644 --- a/techrec/forge.py +++ b/techrec/forge.py @@ -120,9 +120,9 @@ async def create_mp3( for begin, start_cut, end_cut in get_files_and_intervals(start, end): try: file = await get_timefile(begin) - intervals.append((file, start_cut, end_cut)) except Exception as e: - logger.error(f"Error while retrieving {file}: {e}") + logger.error("Error while retrieving file: %s", e) + intervals.append((file, start_cut, end_cut)) if os.path.exists(outfile): raise OSError("file '%s' already exists" % outfile) for path, _s, _e in intervals: