Skip to content

Commit

Permalink
Merge #1528: No lock check on readonly
Browse files Browse the repository at this point in the history
dafc180 no lock check on readonly (roshii)

Pull request description:

  Do not check wallet lock file for read-only
  Fixes #1514 (comment)

ACKs for top commit:
  AdamISZ:
    tACK dafc180 , merging.

Tree-SHA512: 75497710deae573be65b6b8ab9b8ec9957d22f242716471023c33ab7821aaa58797bb5df43b7997d238834c2b3dc8afc27cfa68424bae6826bb23a96b1c2f158
  • Loading branch information
AdamISZ committed Aug 7, 2023
2 parents c40ea37 + dafc180 commit c408041
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jmclient/jmclient/wallet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c408041

Please sign in to comment.