tFix wallet write to support windows - electrum - Electrum Bitcoin wallet
 (HTM) git clone https://git.parazyd.org/electrum
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
       ---
 (DIR) commit 21673c95f4b9546e115fa8a128b0c6bb8c74d4b0
 (DIR) parent 80513745d5355e75608849cac775f756609bc355
 (HTM) Author: Maran <maran.hidskes@gmail.com>
       Date:   Fri, 24 Apr 2015 13:14:17 +0200
       
       Fix wallet write to support windows
       
       Diffstat:
         M lib/wallet.py                       |       7 +++++--
       
       1 file changed, 5 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -135,15 +135,18 @@ class WalletStorage(object):
        
            def write(self):
                assert not threading.currentThread().isDaemon()
       +        temp_path = self.path + '.tmp'
                s = json.dumps(self.data, indent=4, sort_keys=True)
       -        with open(self.path + '.tmp', "w") as f:
       +        with open(temp_path, "w") as f:
                    f.write(s)
       -        os.rename(self.path + '.tmp', self.path)
       +        os.remove(self.path)
       +        os.rename(temp_path, self.path)
                if 'ANDROID_DATA' not in os.environ:
                    import stat
                    os.chmod(self.path,stat.S_IREAD | stat.S_IWRITE)
        
        
       +
        class Abstract_Wallet(object):
            """
            Wallet classes are created to handle various address generation methods.