From fd227baf67410cb3aaa361dd6a7dc21642c73021 Mon Sep 17 00:00:00 2001 From: John Evans Date: Wed, 10 Jul 2013 19:00:16 -0400 Subject: [PATCH] Have to gracefully handle missing openjp2. --- glymur/lib/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/glymur/lib/config.py b/glymur/lib/config.py index a64ff37..a67b632 100644 --- a/glymur/lib/config.py +++ b/glymur/lib/config.py @@ -108,6 +108,9 @@ def load_openjp2(libopenjp2_path): # No help from the config file, try to find it ourselves. libopenjp2_path = find_library('openjp2') + if libopenjp2_path is None: + return None + try: if os.name == "nt": openjp2_lib = ctypes.windll.LoadLibrary(libopenjp2_path)