Browse Source

libsecp: log exception if failed to load

hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
d8a992e400
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 7
      electrum/ecc_fast.py

7
electrum/ecc_fast.py

@ -49,16 +49,17 @@ def load_library():
library_paths = (os.path.join(os.path.dirname(__file__), 'libsecp256k1.so.0'),
'libsecp256k1.so.0')
exceptions = []
secp256k1 = None
for libpath in library_paths:
try:
secp256k1 = ctypes.cdll.LoadLibrary(libpath)
except:
pass
except BaseException as e:
exceptions.append(e)
else:
break
if not secp256k1:
_logger.error('libsecp256k1 library failed to load')
_logger.error(f'libsecp256k1 library failed to load. exceptions: {repr(exceptions)}')
return None
try:

Loading…
Cancel
Save