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)
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':
elif method == 'numblocks.subscribe':
self.blocks = result
- #self.newblock_callback,(result,))
elif method == 'client.version':
pass
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)