treopen the password dialog if user enters incorrect password - electrum - Electrum Bitcoin wallet
 (HTM) git clone https://git.parazyd.org/electrum
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
       ---
 (DIR) commit cbb1a39879c2b807148e80709bbc69b1c2eee002
 (DIR) parent bfb42409488d8bba704e2dd0cd90877ad1874fe6
 (HTM) Author: ThomasV <thomasv@gitorious>
       Date:   Tue, 24 Mar 2015 16:54:10 +0100
       
       reopen the password dialog if user enters incorrect password
       
       Diffstat:
         M gui/qt/main_window.py               |      17 ++++++++++++-----
       
       1 file changed, 12 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
       t@@ -1982,17 +1982,24 @@ class ElectrumWindow(QMainWindow):
        
            def do_protect(self, func, args):
                if self.wallet.use_encryption:
       -            password = self.password_dialog()
       -            if not password:
       -                return
       +            while True:
       +                password = self.password_dialog()
       +                if not password:
       +                    return
       +                try:
       +                    self.wallet.check_password(password)
       +                    break
       +                except Exception as e:
       +                    QMessageBox.warning(self, _('Error'), str(e), _('OK'))
       +                    continue
                else:
                    password = None
        
                if args != (False,):
                    args = (self,) + args + (password,)
                else:
       -            args = (self,password)
       -        apply( func, args)
       +            args = (self, password)
       +        apply(func, args)
        
        
            def show_public_keys(self, address):