File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -468,15 +468,13 @@ def grab_frame(self, **savefig_kwargs):
468468 def finish (self ):
469469 # Call run here now that all frame grabbing is done. All temp files
470470 # are available to be assembled.
471- self ._run ()
472- super ().finish () # Will call clean-up
473-
474- def _cleanup (self ): # Inline to finish() once cleanup() is removed.
475- super ()._cleanup ()
476- if self ._tmpdir :
477- _log .debug ('MovieWriter: clearing temporary path=%s' , self ._tmpdir )
478- self ._tmpdir .cleanup ()
479-
471+ try :
472+ self ._run ()
473+ super ().finish ()
474+ finally :
475+ if self ._tmpdir :
476+ _log .debug ('MovieWriter: clearing temporary path=%s' , self ._tmpdir )
477+ self ._tmpdir .cleanup ()
480478
481479@writers .register ('pillow' )
482480class PillowWriter (AbstractMovieWriter ):
You can’t perform that action at this time.
0 commit comments