Browse Source

call super().__init__() for WalletFileException descendants,

qt: handle unfinished wallets when opened via File>Open (ref #8809)
master
Sander van Grieken 2 years ago
parent
commit
57bd291491
No known key found for this signature in database
GPG Key ID: 9BCF8209EA402EBA
  1. 2
      electrum/gui/qt/__init__.py
  2. 2
      electrum/wallet_db.py

2
electrum/gui/qt/__init__.py

@ -352,6 +352,8 @@ class ElectrumGui(BaseElectrumGui, Logger):
pass # open with wizard below
except WalletRequiresUpgrade:
pass # open with wizard below
except WalletUnfinished:
pass # open with wizard below
except Exception as e:
self.logger.exception('')
err_text = str(e) if isinstance(e, WalletFileException) else repr(e)

2
electrum/wallet_db.py

@ -56,11 +56,13 @@ class WalletRequiresUpgrade(WalletFileException):
class WalletRequiresSplit(WalletFileException):
def __init__(self, split_data):
super().__init__()
self._split_data = split_data
class WalletUnfinished(WalletFileException):
def __init__(self, wallet_db: 'WalletDB'):
super().__init__()
self._wallet_db = wallet_db

Loading…
Cancel
Save