mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-03 12:43:05 +03:00
Have the tempfile use a suffix with a dot
This commit is contained in:
parent
844ed441de
commit
86d5c5c389
|
@ -505,8 +505,11 @@ class Image:
|
||||||
|
|
||||||
def _dump(self, file=None, format=None):
|
def _dump(self, file=None, format=None):
|
||||||
import tempfile, os
|
import tempfile, os
|
||||||
|
suffix = ''
|
||||||
|
if format:
|
||||||
|
suffix = '.'+format
|
||||||
if not file:
|
if not file:
|
||||||
f, file = tempfile.mkstemp(format or '')
|
f, file = tempfile.mkstemp(suffix)
|
||||||
os.close(f)
|
os.close(f)
|
||||||
|
|
||||||
self.load()
|
self.load()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user