Browse Source
hw wallets: improve error message when a dependency is missing
e.g.
```
Debug message
jade: (error getting device infos)
Missing libraries for jade.
ModuleNotFoundError("No module named 'cbor'")
Make sure you install it with python3
```
patch-4
SomberNight
3 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
5 additions and
1 deletions
electrum/plugins/hw_wallet/plugin.py
@ -157,7 +157,11 @@ class HW_PluginBase(BasePlugin):
or versiontuple ( library_version ) < self . minimum_library
or versiontuple ( library_version ) < self . minimum_library
or versiontuple ( library_version ) > = self . maximum_library ) :
or versiontuple ( library_version ) > = self . maximum_library ) :
raise LibraryFoundButUnusable ( library_version = library_version )
raise LibraryFoundButUnusable ( library_version = library_version )
except ImportError :
except ImportError as e :
self . libraries_available_message = (
_ ( " Missing libraries for {} . " ) . format ( self . name )
+ f " \n { e !r} "
)
return False
return False
except LibraryFoundButUnusable as e :
except LibraryFoundButUnusable as e :
library_version = e . library_version
library_version = e . library_version