From 57bd29149135cf1a2b17439116acebdf4a934942 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 15 Jan 2024 17:06:44 +0100 Subject: [PATCH] call super().__init__() for WalletFileException descendants, qt: handle unfinished wallets when opened via File>Open (ref #8809) --- electrum/gui/qt/__init__.py | 2 ++ electrum/wallet_db.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index 58c6bee08..7f5729d3e 100644 --- a/electrum/gui/qt/__init__.py +++ b/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) diff --git a/electrum/wallet_db.py b/electrum/wallet_db.py index 3fc6b74e9..f22cf4e66 100644 --- a/electrum/wallet_db.py +++ b/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