From 4da73fd36b3414ae6dcb54b79a86b76605f4f222 Mon Sep 17 00:00:00 2001 From: John Evans Date: Mon, 27 May 2013 12:00:29 -0400 Subject: [PATCH] Be consistent, always make _OPENJP2 None if there's a problem. --- glymur/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glymur/__init__.py b/glymur/__init__.py index 71fd620..29e8cc4 100644 --- a/glymur/__init__.py +++ b/glymur/__init__.py @@ -55,6 +55,9 @@ def _config(): from ctypes.util import find_library libopenjp2_path = find_library('openjp2') + if libopenjp2_path is None: + return None + try: _OPENJP2 = ctypes.CDLL(libopenjp2_path) except OSError: