mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-02 12:41:06 +08:00
Fix handling of temp file removal
This commit is contained in:
1 parent
fb9f7e7346
commit
be279de2fa
1 file changed
+2
-1
@@ -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'):
|
||||
|
||||
Reference in new issue
Block a user