Skip to content

Commit

Permalink
fix some potential error
Browse files Browse the repository at this point in the history
  • Loading branch information
icodeface committed Dec 5, 2022
1 parent c5ea132 commit c5f0d02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion electrum/gui/qt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions electrum/simple_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c5f0d02

Please sign in to comment.