From b177b31182573f439191214d356a34f5db048beb Mon Sep 17 00:00:00 2001 From: Bryan Hunt Date: Wed, 23 Jun 2021 18:36:55 -0600 Subject: [PATCH] Update python library search logic --- python/cryptoauthlib/library.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/cryptoauthlib/library.py b/python/cryptoauthlib/library.py index f55f29d51..0d3ba03be 100644 --- a/python/cryptoauthlib/library.py +++ b/python/cryptoauthlib/library.py @@ -99,7 +99,10 @@ def load_cryptoauthlib(lib=None): library_file = _force_local_library() _CRYPTO_LIB = cdll.LoadLibrary(library_file) except: - raise LibraryLoadError('Unable to find cryptoauthlib. You may need to reinstall') + try: + _CRYPTO_LIB = cdll.LoadLibrary(_force_local_library()) + except: + raise LibraryLoadError('Unable to find cryptoauthlib. You may need to reinstall')