Browse Source

storage: add a sanity check

see #4803
3.3.3.1
SomberNight 6 years ago
parent
commit
416b687054
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/storage.py

2
electrum/storage.py

@ -175,6 +175,8 @@ class WalletStorage(JsonDB):
self.print_error('Failed to convert label to json format', key) self.print_error('Failed to convert label to json format', key)
continue continue
self.data[key] = value self.data[key] = value
if not isinstance(self.data, dict):
raise WalletFileException("Malformed wallet file (not dict)")
# check here if I need to load a plugin # check here if I need to load a plugin
t = self.get('wallet_type') t = self.get('wallet_type')

Loading…
Cancel
Save