catch http exception when wallet is offline
This commit is contained in:
parent
123b1b10e5
commit
3fe0e160ca
@ -243,8 +243,11 @@ class Interface(threading.Thread):
|
|||||||
if self.session_id:
|
if self.session_id:
|
||||||
headers['cookie'] = 'SESSION=%s'%self.session_id
|
headers['cookie'] = 'SESSION=%s'%self.session_id
|
||||||
|
|
||||||
req = urllib2.Request(self.connection_msg, data_json, headers)
|
try:
|
||||||
response_stream = urllib2.urlopen(req, timeout=DEFAULT_TIMEOUT)
|
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):
|
for index, cookie in enumerate(cj):
|
||||||
if cookie.name=='SESSION':
|
if cookie.name=='SESSION':
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user