diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index 524c51657..f3a7e6805 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -29,18 +29,13 @@ import sys import threading from typing import Optional, TYPE_CHECKING, List, Sequence -from electrum import GuiImportError, WalletStorage -from .wizard.server_connect import QEServerConnectWizard -from .wizard.wallet import QENewWalletWizard -from electrum.wizard import WizardViewState -from electrum.keystore import load_keystore - try: import PyQt5 import PyQt5.QtGui except Exception as e: + from electrum import GuiImportError raise GuiImportError( - "Error: Could not import PyQt5 on Linux systems, " + "Error: Could not import PyQt5. On Linux systems, " "you may try 'sudo apt-get install python3-pyqt5'") from e from PyQt5.QtGui import QGuiApplication @@ -65,6 +60,9 @@ from electrum.wallet_db import WalletDB, WalletRequiresSplit, WalletRequiresUpgr from electrum.logging import Logger from electrum.gui import BaseElectrumGui from electrum.simple_config import SimpleConfig +from electrum.storage import WalletStorage +from electrum.wizard import WizardViewState +from electrum.keystore import load_keystore from .util import read_QIcon, ColorScheme, custom_message_box, MessageBoxMixin, WWLabel from .main_window import ElectrumWindow @@ -73,6 +71,8 @@ from .stylesheet_patcher import patch_qt_stylesheet from .lightning_dialog import LightningDialog from .watchtower_dialog import WatchtowerDialog from .exception_window import Exception_Hook +from .wizard.server_connect import QEServerConnectWizard +from .wizard.wallet import QENewWalletWizard if TYPE_CHECKING: from electrum.daemon import Daemon