diff --git a/glymur/lib/openjpeg.py b/glymur/lib/openjpeg.py index 3dd0592..4f990df 100644 --- a/glymur/lib/openjpeg.py +++ b/glymur/lib/openjpeg.py @@ -23,7 +23,12 @@ def version(): # Need to get the minor version, make sure we are at least at 1.4.x #import pdb; pdb.set_trace() -_MINOR = version().split('.')[1] +if OPENJPEG is not None: + _MINOR = version().split('.')[1] +else: + # Does not really matter. But version should not be called if there is no + # OpenJPEG library found. + _MINOR = 0 class EventMgrType(ctypes.Structure):