File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 17
17
# * Can blit be enabled for movies?
18
18
# * Need to consider event sources to allow clicking through multiple figures
19
19
20
-
21
20
import abc
22
21
import base64
23
22
import contextlib
@@ -482,15 +481,14 @@ def grab_frame(self, **savefig_kwargs):
482
481
def finish (self ):
483
482
# Call run here now that all frame grabbing is done. All temp files
484
483
# are available to be assembled.
485
- try :
486
- self ._run ()
487
- super ().finish ()
488
- finally :
489
- if self ._tmpdir :
490
- _log .debug (
491
- 'MovieWriter: clearing temporary path=%s' , self ._tmpdir
492
- )
493
- self ._tmpdir .cleanup ()
484
+ self ._run ()
485
+ super ().finish () # Will call clean-up
486
+
487
+ def _cleanup (self ): # Inline to finish() once cleanup() is removed.
488
+ super ()._cleanup ()
489
+ if self ._tmpdir :
490
+ _log .debug ('MovieWriter: clearing temporary path=%s' , self ._tmpdir )
491
+ self ._tmpdir .cleanup ()
494
492
495
493
496
494
@writers .register ('pillow' )
You can’t perform that action at this time.
0 commit comments