mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
libsecp: log exception if failed to load
This commit is contained in:
parent
6e5abc049b
commit
d8a992e400
1 changed files with 4 additions and 3 deletions
|
@ -49,16 +49,17 @@ def load_library():
|
||||||
library_paths = (os.path.join(os.path.dirname(__file__), 'libsecp256k1.so.0'),
|
library_paths = (os.path.join(os.path.dirname(__file__), 'libsecp256k1.so.0'),
|
||||||
'libsecp256k1.so.0')
|
'libsecp256k1.so.0')
|
||||||
|
|
||||||
|
exceptions = []
|
||||||
secp256k1 = None
|
secp256k1 = None
|
||||||
for libpath in library_paths:
|
for libpath in library_paths:
|
||||||
try:
|
try:
|
||||||
secp256k1 = ctypes.cdll.LoadLibrary(libpath)
|
secp256k1 = ctypes.cdll.LoadLibrary(libpath)
|
||||||
except:
|
except BaseException as e:
|
||||||
pass
|
exceptions.append(e)
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
if not secp256k1:
|
if not secp256k1:
|
||||||
_logger.error('libsecp256k1 library failed to load')
|
_logger.error(f'libsecp256k1 library failed to load. exceptions: {repr(exceptions)}')
|
||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue