diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index 786e661fd..a1cfd6a1f 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -35,7 +35,7 @@ try: import PyQt5 import PyQt5.QtGui -except Exception: +except Exception as e: raise GuiImportError( "Error: Could not import PyQt5 on Linux systems, " "you may try 'sudo apt-get install python3-pyqt5'") from e diff --git a/electrum/simple_config.py b/electrum/simple_config.py index 51e54f003..86fc829df 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -292,6 +292,13 @@ def get_wallet_path(self, *, use_gui_last_wallet=False): return new_path + def get_fallback_wallet_path(self): + util.assert_datadir_available(self.path) + dirpath = os.path.join(self.path, "wallets") + make_dir(dirpath, allow_symlink=False) + path = os.path.join(self.path, "wallets", "default_wallet") + return path + def remove_from_recently_open(self, filename): recent = self.get('recently_open', []) if filename in recent: