Skip to content

Commit

Permalink
Pass on error
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Dec 17, 2024
1 parent 2b90d7c commit c76c502
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions audiofile/core/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def convert(
try:
# Convert to WAV file with ffmpeg
run_ffmpeg(infile, outfile, offset, duration, sampling_rate)
except FileNotFoundError: # pragma: no cover
raise binary_missing_error("ffmpeg")
except subprocess.CalledProcessError: # pragma: no cover
raise broken_file_error(infile)
except FileNotFoundError as e: # pragma: no cover
raise binary_missing_error("ffmpeg") from e
except subprocess.CalledProcessError as e: # pragma: no cover
raise broken_file_error(infile) from e

0 comments on commit c76c502

Please sign in to comment.