Skip to content

Commit

Permalink
Merge pull request #8 from jmorgadov/fix/catch-not-found-ffmpeg-excep…
Browse files Browse the repository at this point in the history
…tion

Fix/catch not found ffmpeg exception
  • Loading branch information
hiancdtrsnm authored Sep 13, 2020
2 parents a3470b5 + 4c971a3 commit 0a7c7c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Leynier Gutiérrez González ([@leynier](https://github.com/leynier))
* Hian Cañizares Díaz ([@hiancdtrsnm](https://github.com/hiancdtrsnm))
* Javier A. Oramas López ([@JavierOramas](https://github.com/javieroramas))
* Jorge Morgado Vega ([@jmorgadov](https://github.com/jmorgadov))

You can help out by:

Expand Down
10 changes: 9 additions & 1 deletion video_diet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,12 @@ def file(path: Path = typer.Argument(
typer.secho('The destination file already exist, please delete it', fg=RED)
return

convert_video(str(path),str(conv_path))
try:
convert_video(str(path),str(conv_path))

except FileNotFoundError as error:
if error.filename == 'ffmpeg':
typer.secho('It seems you don\'t have ffmpeg installed', fg=RED)
typer.secho('Check FFMPEG secction on https://github.com/hiancdtrsnm/video-diet#FFMPEG', fg=RED)
else:
raise error

0 comments on commit 0a7c7c8

Please sign in to comment.