Have the tempfile use a suffix with a dot

This commit is contained in:
wiredfool 2014-04-07 16:01:49 -07:00
parent 844ed441de
commit 86d5c5c389

View File

@ -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()