electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit a57274930b16b566caf74b671eee61434bd044f3
parent 35fe8fc0c1da48c1de6834632fff654f04a0bb41
Author: ThomasV <thomasv@electrum.org>
Date:   Thu, 10 Mar 2016 10:39:47 +0100

kivy's python-for-android can import stat

Diffstat:
Mlib/wallet.py | 11++++-------
1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/wallet.py b/lib/wallet.py @@ -32,11 +32,12 @@ import time import json import copy import re +import stat from functools import partial from unicodedata import normalize from collections import namedtuple -from i18n import _ +from i18n import _ from util import NotEnoughFunds, PrintError, profiler from bitcoin import * @@ -140,18 +141,14 @@ class WalletStorage(PrintError): f.flush() os.fsync(f.fileno()) - if 'ANDROID_DATA' not in os.environ: - import stat - mode = os.stat(self.path).st_mode if os.path.exists(self.path) else stat.S_IREAD | stat.S_IWRITE + mode = os.stat(self.path).st_mode if os.path.exists(self.path) else stat.S_IREAD | stat.S_IWRITE # perform atomic write on POSIX systems try: os.rename(temp_path, self.path) except: os.remove(self.path) os.rename(temp_path, self.path) - if 'ANDROID_DATA' not in os.environ: - import stat - os.chmod(self.path, mode) + os.chmod(self.path, mode) self.print_error("saved", self.path) self.modified = False