storage: do not raise error if file is empty

This commit is contained in:
ThomasV 2016-03-10 10:17:03 +01:00
parent 30eddf4bf0
commit f60c949911
1 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,8 @@ class WalletStorage(PrintError):
data = f.read() data = f.read()
except IOError: except IOError:
return return
if not data:
return
try: try:
self.data = json.loads(data) self.data = json.loads(data)
except: except: