electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 22a0fdd4924ff70bf6856273d7b726657ea7e4d7
parent 7d8f5e1aec1d5f868b69398f263cbcef30203269
Author: ThomasV <thomasv@gitorious>
Date:   Fri, 23 Mar 2012 19:32:16 +0100

better errors

Diffstat:
Mclient/electrum | 3++-
Mclient/gui_qt.py | 6+++++-
Mclient/wallet.py | 7+------
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/client/electrum b/client/electrum @@ -77,7 +77,8 @@ if __name__ == '__main__': found = wallet.file_exists if not found: found = gui.restore_or_create() - + except SystemExit, e: + exit(e) except BaseException, e: import traceback traceback.print_exc(file=sys.stdout) diff --git a/client/gui_qt.py b/client/gui_qt.py @@ -782,7 +782,11 @@ class ElectrumWindow(QMainWindow): except: import mnemonic print "not hex, trying decode" - seed = mnemonic.mn_decode( seed.split(' ') ) + try: + seed = mnemonic.mn_decode( seed.split(' ') ) + except: + QMessageBox.warning(None, 'Error', 'I cannot decode this', 'OK') + sys.exit(0) if not seed: QMessageBox.warning(None, 'Error', 'no seed', 'OK') sys.exit(0) diff --git a/client/wallet.py b/client/wallet.py @@ -949,15 +949,11 @@ class Wallet: if blocks == -1: raise BaseException("session not found") self.blocks = int(blocks) if changed_addresses: - #self.is_up_to_date = False self.was_updated = True for addr, status in changed_addresses.items(): self.receive_status_callback(addr, status) - #else: - # self.is_up_to_date = True elif method == 'server.peers': - #print "Received server list: ", result self.interface.servers = map( lambda x:x[1], result ) elif method == 'address.subscribe': @@ -975,7 +971,6 @@ class Wallet: elif method == 'numblocks.subscribe': self.blocks = result - #self.newblock_callback,(result,)) elif method == 'client.version': pass @@ -1022,4 +1017,4 @@ class Wallet: addresses = self.all_addresses() version = self.electrum_version self.interface.start_session(addresses, version) - #print "Starting new session: %s:%d"%(self.host,self.port) + print "Starting new session: %s:%d"%(self.host,self.port)