Closed althonos closed 4 years ago
See #639.
Using a context makes sure that the NamedTemporaryFile used in to_bin is only closed when we are done reading its content, and prevents an early deletion of the file if it gets garbage-collected before the results of to_png are read.
NamedTemporaryFile
to_bin
to_png
Thanks!
See #639.
Using a context makes sure that the
NamedTemporaryFile
used into_bin
is only closed when we are done reading its content, and prevents an early deletion of the file if it gets garbage-collected before the results ofto_png
are read.