Browse Source

workaround for keyboard interrupt

283
ThomasV 13 years ago
parent
commit
0ab4ecfdbf
  1. 8
      client/blocks
  2. 2
      client/wallet.py

8
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')

2
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):

Loading…
Cancel
Save