1
0

clean implementation of daemon threads

This commit is contained in:
ThomasV
2015-03-13 23:04:29 +01:00
parent 58f9ab3492
commit 72688a5cfa
8 changed files with 53 additions and 111 deletions

View File

@@ -134,9 +134,8 @@ class WalletStorage(object):
def write(self):
s = json.dumps(self.data, indent=4, sort_keys=True)
f = open(self.path,"w")
f.write(s)
f.close()
with open(self.path,"w") as f:
f.write(s)
if 'ANDROID_DATA' not in os.environ:
import stat
os.chmod(self.path,stat.S_IREAD | stat.S_IWRITE)