fix the exception handling
we ♥ when exceptions create more exceptions
This commit is contained in:
parent
c3f6423771
commit
d49c7dff00
1 changed files with 2 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue