crypto.py: replace sys.exit with ImportError
not nice to call sys.exit from inside the library (run_electrum can do it, but the library probably should not)
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ else:
|
||||
|
||||
|
||||
if not (HAS_CRYPTODOME or HAS_CRYPTOGRAPHY):
|
||||
sys.exit(f"Error: at least one of ('pycryptodomex', 'cryptography') needs to be installed.")
|
||||
raise ImportError(f"Error: at least one of ('pycryptodomex', 'cryptography') needs to be installed.")
|
||||
|
||||
|
||||
def version_info() -> Mapping[str, Optional[str]]:
|
||||
|
||||
Reference in New Issue
Block a user