mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 07:04:03 +08:00
STY: Fix confusing use of context-manager.
This commit is contained in:
+2
-3
@@ -133,9 +133,8 @@ def imread(fname, as_grey=False, plugin=None, flatten=None,
|
||||
with tempfile.NamedTemporaryFile(delete=False) as f:
|
||||
u = urllib2.urlopen(fname)
|
||||
f.write(u.read())
|
||||
f.close()
|
||||
img = call_plugin('imread', f.name, plugin=plugin, **plugin_args)
|
||||
os.remove(f.name)
|
||||
img = call_plugin('imread', f.name, plugin=plugin, **plugin_args)
|
||||
os.remove(f.name)
|
||||
else:
|
||||
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user