Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6c0b72f

Browse files
committed
Remove animation temp file *after* it's closed.
1 parent 8cc21db commit 6c0b72f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/animation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,9 @@ def to_html5_video(self):
920920
self._base64_video = vid64.decode('ascii')
921921
self._video_size = 'width="{0}" height="{1}"'.format(
922922
*writer.frame_size)
923-
os.remove(f.name) # Now we can remove
923+
924+
# Now we can remove
925+
os.remove(f.name)
924926

925927
# Default HTML5 options are to autoplay and to display video controls
926928
options = ['controls', 'autoplay']

0 commit comments

Comments
 (0)