mirror of
https://github.com/status-im/cabot.git
synced 2025-02-24 18:38:07 +00:00
Don't send blank auth
This commit is contained in:
parent
0bfebe61c8
commit
6d6db6c208
@ -497,12 +497,19 @@ class HttpStatusCheck(StatusCheck):
|
||||
result = StatusCheckResult(check=self)
|
||||
auth = (self.username, self.password)
|
||||
try:
|
||||
resp = requests.get(
|
||||
self.endpoint,
|
||||
timeout=self.timeout,
|
||||
verify=self.verify_ssl_certificate,
|
||||
auth=auth
|
||||
)
|
||||
if self.username or self.password:
|
||||
resp = requests.get(
|
||||
self.endpoint,
|
||||
timeout=self.timeout,
|
||||
verify=self.verify_ssl_certificate,
|
||||
auth=auth
|
||||
)
|
||||
else:
|
||||
resp = requests.get(
|
||||
self.endpoint,
|
||||
timeout=self.timeout,
|
||||
verify=self.verify_ssl_certificate,
|
||||
)
|
||||
except requests.RequestException as e:
|
||||
result.error = u'Request error occurred: %s' % (e,)
|
||||
result.succeeded = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user