1
0

Better error when opening a non-wallet file

Also window modality fixes for __init__.py
This commit is contained in:
Neil Booth
2015-12-23 13:54:43 +09:00
parent 1afb644203
commit 72fdf0cd21
2 changed files with 3 additions and 3 deletions

View File

@@ -69,11 +69,11 @@ class WalletStorage(PrintError):
except:
try:
d = ast.literal_eval(data) #parse raw data from reading wallet file
labels = d.get('labels', {})
except Exception as e:
raise IOError("Cannot read wallet file '%s'" % self.path)
self.data = {}
# In old versions of Electrum labels were latin1 encoded, this fixes breakage.
labels = d.get('labels', {})
for i, label in labels.items():
try:
unicode(label)