added return false for errors on performget

This commit is contained in:
Kevin Froman 2018-01-23 23:28:43 -06:00
parent b41e51937e
commit 4966925b14
1 changed files with 4 additions and 1 deletions

View File

@ -80,7 +80,10 @@ class OnionrCommunicate:
url = 'http://' + peer + '/public/?action=' + action
if data != None:
url = url + '&data=' + data
r = requests.get(url, headers=headers, proxies=proxies)
try:
r = requests.get(url, headers=headers, proxies=proxies)
except requests.exceptions.RequestException:
return False
return r.text