From dafc1800ba9bd1c2a698492b2da630f3c5450ab6 Mon Sep 17 00:00:00 2001 From: roshii Date: Mon, 7 Aug 2023 20:59:51 +0200 Subject: [PATCH] no lock check on readonly --- jmclient/jmclient/wallet_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jmclient/jmclient/wallet_utils.py b/jmclient/jmclient/wallet_utils.py index 50d4db8..8a40fd0 100644 --- a/jmclient/jmclient/wallet_utils.py +++ b/jmclient/jmclient/wallet_utils.py @@ -1532,8 +1532,9 @@ def open_wallet(path, ask_for_password=True, password=None, read_only=False, if ask_for_password and Storage.is_encrypted_storage_file(path): while True: try: - # Verify lock status before trying to open wallet. - Storage.verify_lock(path) + # Verify lock status if not read only before trying to open wallet. + if not read_only: + Storage.verify_lock(path) # do not try empty password, assume unencrypted on empty password pwd = get_password("Enter passphrase to decrypt wallet: ") or None storage = Storage(path, password=pwd, read_only=read_only)