tfix restore from mpk command line - electrum - Electrum Bitcoin wallet
 (HTM) git clone https://git.parazyd.org/electrum
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
       ---
 (DIR) commit bd6f21232d7e627dec295fc27f1a4fa00c1c141a
 (DIR) parent ea9e468333e97cdec7a2b6f4268430f5706d8ca9
 (HTM) Author: ThomasV <thomasv@gitorious>
       Date:   Mon,  8 Sep 2014 05:17:56 +0200
       
       fix restore from mpk command line
       
       Diffstat:
         M electrum                            |       8 ++++++--
         M lib/wallet.py                       |       6 ++----
       
       2 files changed, 8 insertions(+), 6 deletions(-)
       ---
 (DIR) diff --git a/electrum b/electrum
       t@@ -283,7 +283,10 @@ if __name__ == '__main__':
        
                if cmd.name == 'restore':
                    if options.mpk:
       -                wallet = Wallet.from_mpk(options.mpk, storage)
       +                if Wallet.is_old_mpk(options.mpk):
       +                    wallet = Wallet.from_old_mpk(options.mpk, storage)
       +                if Wallet.is_xpub(options.mpk):
       +                    wallet = Wallet.from_xpub(options.mpk, storage)
                    else:
                        import getpass
                        seed = getpass.getpass(prompt="seed:", stream=None) if options.concealed else raw_input("seed:")
       t@@ -295,7 +298,8 @@ if __name__ == '__main__':
                        wallet.create_main_account(password)
        
                    if not options.offline:
       -                network = Network(config)
       +                s = get_daemon(config, True)
       +                network = NetworkProxy(s,config)
                        network.start()
                        wallet.start_threads(network)
                        print_msg("Recovering wallet...")
 (DIR) diff --git a/lib/wallet.py b/lib/wallet.py
       t@@ -1191,12 +1191,10 @@ class Deterministic_Wallet(Abstract_Wallet):
                def wait_for_wallet():
                    self.set_up_to_date(False)
                    while not self.is_up_to_date():
       -                msg = "%s\n%s %d\n%s %.1f"%(
       +                msg = "%s\n%s %d"%(
                            _("Please wait..."),
                            _("Addresses generated:"),
       -                    len(self.addresses(True)),
       -                    _("Kilobytes received:"),
       -                    self.network.interface.bytes_received/1024.)
       +                    len(self.addresses(True)))
        
                        apply(callback, (msg,))
                        time.sleep(0.1)