safeguard: do not let daemon treads write wallet file

This commit is contained in:
ThomasV 2015-03-24 12:23:11 +01:00
parent 0200778ac1
commit 1369c02011
1 changed files with 1 additions and 0 deletions

View File

@ -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)