From d33212656f7a3f31f90d568adbc59d8467454304 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 27 Mar 2026 15:30:34 +0000 Subject: [PATCH] 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) --- electrum/crypto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/crypto.py b/electrum/crypto.py index f67b09970..ad46e38b3 100644 --- a/electrum/crypto.py +++ b/electrum/crypto.py @@ -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]]: