Skip to content

Commit

Permalink
Check if there is a warning before handling it
Browse files Browse the repository at this point in the history
  • Loading branch information
giovcandido committed Sep 17, 2021
1 parent 94f534a commit 58ac628
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sedona/Converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
with catch_warnings(record=True) as w:
from pydub import AudioSegment

warning_message = str(w[-1].message)
if bool(w):
warning_message = str(w[-1].message)

if 'ffmpeg' in warning_message and 'avconv' in warning_message:
print('[Warning] You need to install ffmpeg package in your system.')
print('For more information, check our repository:')
print('https://github.com/giovcandido/sedona')
if 'ffmpeg' in warning_message and 'avconv' in warning_message:
print('[Warning] You need to install ffmpeg package in your system.')
print('For more information, check our repository:')
print('https://github.com/giovcandido/sedona')

from os import path, mkdir

Expand Down

0 comments on commit 58ac628

Please sign in to comment.