tfix SocketPipe for returning empty array - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit e3b7239d195eca38efd9407882a07bd294068b80 (DIR) parent 14cc260092b82e47aed889e862dc4a2cb80eb7ad (HTM) Author: ThomasV <thomasv@electrum.org> Date: Thu, 3 Sep 2015 10:09:25 +0200 fix SocketPipe for returning empty array Diffstat: M electrum | 1 + M lib/util.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) --- (DIR) diff --git a/electrum b/electrum t@@ -510,6 +510,7 @@ if __name__ == '__main__': s = get_daemon(config, False) if s: p = util.SocketPipe(s) + p.set_timeout(False) p.send(config_options) result = p.get() s.close() (DIR) diff --git a/lib/util.py b/lib/util.py t@@ -392,7 +392,7 @@ class SocketPipe: def get(self): while True: response, self.message = parse_json(self.message) - if response: + if response is not None: return response try: data = self.socket.recv(1024)