Have to gracefully handle missing openjp2.
This commit is contained in:
parent
bfdebf5b48
commit
fd227baf67
1 changed files with 3 additions and 0 deletions
|
|
@ -108,6 +108,9 @@ def load_openjp2(libopenjp2_path):
|
||||||
# No help from the config file, try to find it ourselves.
|
# No help from the config file, try to find it ourselves.
|
||||||
libopenjp2_path = find_library('openjp2')
|
libopenjp2_path = find_library('openjp2')
|
||||||
|
|
||||||
|
if libopenjp2_path is None:
|
||||||
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
openjp2_lib = ctypes.windll.LoadLibrary(libopenjp2_path)
|
openjp2_lib = ctypes.windll.LoadLibrary(libopenjp2_path)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue