Be consistent, always make _OPENJP2 None if there's a problem.
This commit is contained in:
parent
85ca8b384a
commit
4da73fd36b
1 changed files with 3 additions and 0 deletions
|
|
@ -55,6 +55,9 @@ def _config():
|
||||||
from ctypes.util import find_library
|
from ctypes.util import find_library
|
||||||
libopenjp2_path = find_library('openjp2')
|
libopenjp2_path = find_library('openjp2')
|
||||||
|
|
||||||
|
if libopenjp2_path is None:
|
||||||
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
_OPENJP2 = ctypes.CDLL(libopenjp2_path)
|
_OPENJP2 = ctypes.CDLL(libopenjp2_path)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue