mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
catch exception raised if url is not reachable
This commit is contained in:
parent
558ba16bc2
commit
f14f22636f
1 changed files with 5 additions and 2 deletions
|
@ -28,8 +28,11 @@ class Exchanger(threading.Thread):
|
||||||
self.discovery()
|
self.discovery()
|
||||||
|
|
||||||
def discovery(self):
|
def discovery(self):
|
||||||
|
try:
|
||||||
connection = httplib.HTTPSConnection('blockchain.info')
|
connection = httplib.HTTPSConnection('blockchain.info')
|
||||||
connection.request("GET", "/ticker")
|
connection.request("GET", "/ticker")
|
||||||
|
except:
|
||||||
|
return
|
||||||
response = connection.getresponse()
|
response = connection.getresponse()
|
||||||
if response.reason == httplib.responses[httplib.NOT_FOUND]:
|
if response.reason == httplib.responses[httplib.NOT_FOUND]:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue