Testing whether e.cleanup causes segfaults

This commit is contained in:
Josh Ware 2014-08-27 18:50:57 +10:00 committed by wiredfool
parent dace8913b8
commit 3da6768a72

View File

@ -473,7 +473,7 @@ def _save(im, fp, tile, bufsize=0):
break
if s < 0:
raise IOError("encoder error %d when writing image file" % s)
e.cleanup()
#e.cleanup()
else:
# slight speedup: compress to real file object
for e, b, o, a in tile:
@ -484,7 +484,7 @@ def _save(im, fp, tile, bufsize=0):
s = e.encode_to_file(fh, bufsize)
if s < 0:
raise IOError("encoder error %d when writing image file" % s)
e.cleanup()
#e.cleanup()
try:
fp.flush()
except: pass