electrum

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

commit 83e699c314a867034743b7ac936738268db1c060
parent 367b11681b131bb0b36d6715e8058af5e6b646fd
Author: ThomasV <thomasv@gitorious>
Date:   Tue,  8 Oct 2013 19:52:17 +0200

sanitize server in interface.py (fix bug #309)

Diffstat:
Mlib/interface.py | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/interface.py b/lib/interface.py @@ -109,9 +109,13 @@ class Interface(threading.Thread): # parse server self.server = server - host, port, protocol = self.server.split(':') - port = int(port) - + try: + host, port, protocol = self.server.split(':') + port = int(port) + except: + self.server = None + return + if protocol not in 'ghst': raise BaseException('Unknown protocol: %s'%protocol) @@ -539,6 +543,8 @@ class Interface(threading.Thread): def start(self, queue = None, wait = False): + if not self.server: + return self.queue = queue if queue else Queue.Queue() threading.Thread.start(self) if wait: