Skip to content

Commit

Permalink
Test that the temporary audio file exists (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybenitezf authored Mar 9, 2020
1 parent 11f0d8d commit d467ad9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions moviepy/video/VideoClip.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def write_videofile(self, filename, fps=None, codec=None,
logger
Either "bar" for progress bar or None or any Proglog logger.
verbose (deprecated, kept for compatibility)
Formerly used for toggling messages on/off. Use logger=None now.
Expand Down Expand Up @@ -326,7 +326,8 @@ def write_videofile(self, filename, fps=None, codec=None,
logger=logger)

if remove_temp and make_audio:
os.remove(audiofile)
if os.path.exists(audiofile):
os.remove(audiofile)
logger(message="Moviepy - video ready %s" % filename)

@requires_duration
Expand Down

0 comments on commit d467ad9

Please sign in to comment.