tkivy's python-for-android can import stat - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit a57274930b16b566caf74b671eee61434bd044f3 DIR parent 35fe8fc0c1da48c1de6834632fff654f04a0bb41 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 10 Mar 2016 10:39:47 +0100 kivy's python-for-android can import stat Diffstat: M lib/wallet.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) --- DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -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 * t@@ -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