1
0

cli: load_wallet now auto-upgrades the WalletStorage when needed

previously it would bail out and just return False
This commit is contained in:
SomberNight
2019-11-22 15:54:34 +01:00
parent 3d88d6870c
commit 420b1a6636
2 changed files with 3 additions and 3 deletions

View File

@@ -376,13 +376,13 @@ class Daemon(Logger):
response = "Error: Electrum is running in daemon mode. Please stop the daemon first."
return response
def load_wallet(self, path, password) -> Optional[Abstract_Wallet]:
def load_wallet(self, path, password, *, manual_upgrades=True) -> Optional[Abstract_Wallet]:
path = standardize_path(path)
# wizard will be launched if we return
if path in self._wallets:
wallet = self._wallets[path]
return wallet
storage = WalletStorage(path, manual_upgrades=True)
storage = WalletStorage(path, manual_upgrades=manual_upgrades)
if not storage.file_exists():
return
if storage.is_encrypted():