From 1369c02011720706d47a0a0957f73c85a82693f0 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Tue, 24 Mar 2015 12:23:11 +0100 Subject: [PATCH] safeguard: do not let daemon treads write wallet file --- lib/wallet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/wallet.py b/lib/wallet.py index 6aaf3f37..0aee2239 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -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)