forked from p15670423/monkey
Request exception handling
This commit is contained in:
parent
fe236ebc05
commit
f4a47f3cb3
|
@ -41,10 +41,14 @@ class UsersPBA(PBA):
|
||||||
:return: True if successful, false otherwise
|
:return: True if successful, false otherwise
|
||||||
"""
|
"""
|
||||||
|
|
||||||
pba_file_contents = requests.get("https://%s/api/pba/download/%s" %
|
try:
|
||||||
(WormConfiguration.current_server, filename),
|
pba_file_contents = requests.get("https://%s/api/pba/download/%s" %
|
||||||
verify=False,
|
(WormConfiguration.current_server, filename),
|
||||||
proxies=ControlClient.proxies)
|
verify=False,
|
||||||
|
proxies=ControlClient.proxies)
|
||||||
|
except requests.exceptions.RequestException:
|
||||||
|
return False
|
||||||
|
|
||||||
if not pba_file_contents.content:
|
if not pba_file_contents.content:
|
||||||
LOG.error("Island didn't respond with post breach file.")
|
LOG.error("Island didn't respond with post breach file.")
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in New Issue