tfollow-up #4396: new 2fa wallets could not be created - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit cfc52e6441cd9301ca7efcf4622edd81c80b94a8 DIR parent 141994ed1b35803f26c09001b39a1209f2c29e4a HTML Author: SomberNight <somber.night@protonmail.com> Date: Fri, 1 Jun 2018 22:19:00 +0200 follow-up #4396: new 2fa wallets could not be created Diffstat: M lib/storage.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) --- DIR diff --git a/lib/storage.py b/lib/storage.py t@@ -578,17 +578,14 @@ class WalletStorage(PrintError): return True def get_action(self): - if self.file_exists(): - action = run_hook('get_action', self) - if action and self.requires_upgrade(): + action = run_hook('get_action', self) + if self.file_exists() and self.requires_upgrade(): + if action: raise WalletFileException(_('Incomplete wallet files cannot be upgraded.')) - elif self.requires_upgrade(): - return 'upgrade_storage' - elif action: - return action - else: - return None - else: + return 'upgrade_storage' + if action: + return action + if not self.file_exists(): return 'new' def get_seed_version(self):