URI: 
       trestore lock in storage.write (follow up to b5e0363f) - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 0fe410d7e6a09769b7cd7341acedb6c590203ac1
   DIR parent 5a5cc9704586277fdbbcb401ffc3fbb0dc41b34d
  HTML Author: ThomasV <thomasv@electrum.org>
       Date:   Thu,  1 Oct 2015 13:26:22 +0200
       
       restore lock in storage.write (follow up to b5e0363f)
       
       Diffstat:
         M lib/wallet.py                       |       7 +++----
       
       1 file changed, 3 insertions(+), 4 deletions(-)
       ---
   DIR diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -112,15 +112,14 @@ class WalletStorage(PrintError):
                    elif key in self.data:
                        self.modified = True
                        self.data.pop(key)
       -        if save:
       -            self.write()
       +            if save:
       +                self.write()
        
            def write(self):
                assert not threading.currentThread().isDaemon()
                if not self.modified:
                    return
       -        with self.lock:
       -            s = json.dumps(self.data, indent=4, sort_keys=True)
       +        s = json.dumps(self.data, indent=4, sort_keys=True)
                temp_path = "%s.tmp.%s" % (self.path, os.getpid())
                with open(temp_path, "w") as f:
                    f.write(s)