mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2024-11-25 16:28:57 +05:30
Handled exception where .so can not be loaded.
This commit is contained in:
parent
53ec9b0474
commit
a2d91cd56b
@ -1,9 +1,11 @@
|
|||||||
import sys, ctypes
|
import ctypes
|
||||||
|
|
||||||
sharedlib = './lib3ddevil1.so'
|
sharedlib = './lib3ddevil1.so'
|
||||||
|
try:
|
||||||
libc = ctypes.cdll.LoadLibrary(sharedlib)
|
libc = ctypes.cdll.LoadLibrary(sharedlib)
|
||||||
if not libc:
|
except OSError as e:
|
||||||
|
print("Error loading dynamically linked library.\nOSError: " + str(e))
|
||||||
raise SystemExit("Couldn't load %s" % sharedlib)
|
raise SystemExit("Couldn't load %s" % sharedlib)
|
||||||
|
|
||||||
# Don't need these anymore
|
# Don't need these anymore
|
||||||
del sys, sharedlib
|
del sharedlib
|
||||||
|
Loading…
Reference in New Issue
Block a user