electrum

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

commit 0ab4ecfdbf0d607bb3bf665176273e387f261d79
parent 70ef6847181ca2a3904d4faa4892bf8e1935d154
Author: ThomasV <thomasv@gitorious>
Date:   Sat, 24 Mar 2012 15:23:33 +0100

workaround for keyboard interrupt

Diffstat:
Mclient/blocks | 8+++-----
Mclient/wallet.py | 2+-
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/client/blocks b/client/blocks @@ -2,11 +2,9 @@ import socket, time, interface -def cb(block_number): - print block_number - -i = interface.AsynchronousInterface('ecdsa.org', 50001, newblock_callback=cb) +i = interface.AsynchronousInterface('ecdsa.org', 50001) i.start_session([],"blocks") while True: - time.sleep(1) + r = i.responses.get(True, 100000000000) + if r.get('method')=='numblocks.subscribe': print r.get('result') diff --git a/client/wallet.py b/client/wallet.py @@ -974,7 +974,7 @@ class Wallet: else: self.up_to_date = False - response = self.interface.responses.get() + response = self.interface.responses.get(True,100000000000) # workaround so that it can be keyboard interrupted self.handle_response(response) def start_interface(self):