tcatch http exception when wallet is offline - electrum - Electrum Bitcoin wallet
 (HTM) git clone https://git.parazyd.org/electrum
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
       ---
 (DIR) commit 3fe0e160ca6b96d89c32b75088fb11578a131699
 (DIR) parent 123b1b10e5bc19e808c256200390d850c2f38f2e
 (HTM) Author: ecdsa <ecdsa@github>
       Date:   Mon,  4 Mar 2013 17:20:07 +0100
       
       catch http exception when wallet is offline
       
       Diffstat:
         M lib/interface.py                    |       7 +++++--
       
       1 file changed, 5 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/lib/interface.py b/lib/interface.py
       t@@ -243,8 +243,11 @@ class Interface(threading.Thread):
                if self.session_id:
                    headers['cookie'] = 'SESSION=%s'%self.session_id
        
       -        req = urllib2.Request(self.connection_msg, data_json, headers)
       -        response_stream = urllib2.urlopen(req, timeout=DEFAULT_TIMEOUT)
       +        try:
       +            req = urllib2.Request(self.connection_msg, data_json, headers)
       +            response_stream = urllib2.urlopen(req, timeout=DEFAULT_TIMEOUT)
       +        except:
       +            return
        
                for index, cookie in enumerate(cj):
                    if cookie.name=='SESSION':