Commit 39e37149 authored by Kelvin's avatar Kelvin Committed by Jesse Mapel
Browse files

better errors for import libusgscsm

parent ae51cc6d
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -9,7 +9,12 @@ from . import csm
from csmapi import csmapi

# Register the usgscam plugin with the csmapi
libusgscsm_path = find_library('usgscsm')

lib = ctypes.CDLL(find_library('usgscsm'))
if not lib:
if not libusgscsm_path:
    warnings.warn('libusgscsm not installed, unable to load shared library.')

libusgscsm = ctypes.CDLL(libusgscsm_path)

if not libusgscsm._name:
    warnings.warn('Unable to load usgscsm shared library')