tstorage: do not raise error if file is empty - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit f60c949911c78e7c6bfe060d959b54fae9288de8
DIR parent 30eddf4bf0c891a70099fe738ddf7f6a587e65bb
HTML Author: ThomasV <thomasv@electrum.org>
Date: Thu, 10 Mar 2016 10:17:03 +0100
storage: do not raise error if file is empty
Diffstat:
M lib/wallet.py | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
DIR diff --git a/lib/wallet.py b/lib/wallet.py
t@@ -75,6 +75,8 @@ class WalletStorage(PrintError):
data = f.read()
except IOError:
return
+ if not data:
+ return
try:
self.data = json.loads(data)
except: