mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +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):
|
||||
import tempfile, os
|
||||
suffix = ''
|
||||
if format:
|
||||
suffix = '.'+format
|
||||
if not file:
|
||||
f, file = tempfile.mkstemp(format or '')
|
||||
f, file = tempfile.mkstemp(suffix)
|
||||
os.close(f)
|
||||
|
||||
self.load()
|
||||
|
|
Loading…
Reference in New Issue
Block a user