tminor fixes - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit fe142452e2faf4c09218686cd90202ed83d6488a DIR parent 29072ef1ad65ea4072af6b7fade1e54f24ec084b HTML Author: ThomasV <thomasv@gitorious> Date: Wed, 28 Mar 2012 14:22:46 +0200 minor fixes Diffstat: M client/interface.py | 5 +++-- M client/wallet.py | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) --- DIR diff --git a/client/interface.py b/client/interface.py t@@ -58,7 +58,7 @@ class Interface: try: method = c['method'] except: - print "error" + print "error", c return if error: t@@ -226,7 +226,8 @@ class HttpInterface(PollingInterface): thread.start_new_thread(self.poll_thread, (15,)) def poll(self): - self.send( [] ) + if self.session_id: + self.send( [] ) def send(self, messages): import urllib2, json, time, cookielib DIR diff --git a/client/wallet.py b/client/wallet.py t@@ -270,11 +270,12 @@ class Wallet: self.imported_keys = {} self.remote_url = None - self.was_updated = False + self.was_updated = True self.blocks = 0 self.banner = '' self.up_to_date_event = threading.Event() self.up_to_date_event.clear() + self.up_to_date = False self.interface_lock = threading.Lock() self.tx_event = threading.Event() t@@ -967,7 +968,8 @@ class Wallet: def run(self): while self.interface.is_connected: new_addresses = self.synchronize() - self.interface.subscribe(new_addresses) + if new_addresses: + self.interface.subscribe(new_addresses) if self.interface.is_up_to_date() and not new_addresses: self.up_to_date = True self.up_to_date_event.set()