Not trying to running opj_version upon import anymore when no library.

This should allow us to warn but not error out when neither library is
present.  We should be able to retrieve metadata on such configurations.
This commit is contained in:
John Evans 2013-07-25 15:27:53 -04:00
commit 1d23ffcfbf

View file

@ -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):