Fix handling of temp file removal

This commit is contained in:
Steven Silvester
2014-10-08 22:06:45 -05:00
parent fb9f7e7346
commit be279de2fa
+2 -1
View File
@@ -92,11 +92,12 @@ def roundtrip(img, plugin, suffix):
temp_file.close()
fname = temp_file.name
io.imsave(fname, img, plugin=plugin)
new = io.imread(fname, plugin=plugin)
try:
os.remove(fname)
except Exception:
pass
return io.imread(fname, plugin=plugin)
return new
def ubyte_check(plugin, fmt='png'):