tsafeguard: do not let daemon treads write wallet file - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 1369c02011720706d47a0a0957f73c85a82693f0
DIR parent 0200778ac1adbe6d2a4068c2afa86a25a786f8ac
HTML Author: ThomasV <thomasv@gitorious>
Date: Tue, 24 Mar 2015 12:23:11 +0100
safeguard: do not let daemon treads write wallet file
Diffstat:
M lib/wallet.py | 1 +
1 file changed, 1 insertion(+), 0 deletions(-)
---
DIR diff --git a/lib/wallet.py b/lib/wallet.py
t@@ -133,6 +133,7 @@ class WalletStorage(object):
self.write()
def write(self):
+ assert not threading.currentThread().isDaemon()
s = json.dumps(self.data, indent=4, sort_keys=True)
with open(self.path,"w") as f:
f.write(s)