From 89f0151a7a4329007b6ac6e93194466f779bb10f Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Fri, 20 Jul 2012 15:05:45 -0400 Subject: [PATCH] BUG: Fix testing failures when FreeImage not installed. FreeImage throws an OSError, which must be caught when attempting to load the IO plugins for tests to pass without FreeImage installed. --- skimage/io/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/io/__init__.py b/skimage/io/__init__.py index c5dd0b77..5e701a51 100644 --- a/skimage/io/__init__.py +++ b/skimage/io/__init__.py @@ -31,7 +31,7 @@ def _load_preferred_plugins(): try: use_plugin(plugin, kind=func) break - except (ImportError, RuntimeError): + except (ImportError, RuntimeError, OSError): pass # Use PIL as the default imread plugin, since matplotlib (1.2.x)