Skip to content

Commit

Permalink
Remove some keys
Browse files Browse the repository at this point in the history
  • Loading branch information
idrissneumann committed Sep 11, 2024
1 parent 6be219e commit 56912fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.3
4.0.4
4 changes: 3 additions & 1 deletion src/utils/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ def check_http_monitor(monitor, gauges):
expected_contain = get_or_else(monitor, 'expected_contain', None)
username = get_or_else(monitor, 'username', None)
password = get_or_else(monitor, 'password', None)
remove_key_safely(monitor, 'password')

auth = None
duration = None
if is_not_empty(username) and is_not_empty(password):
auth = HTTPBasicAuth(username, password)

remove_key_safely(monitor, 'username')
remove_key_safely(monitor, 'password')

try:
if method == "GET":
response = requests.get(monitor['url'], timeout=timeout, auth=auth)
Expand Down

0 comments on commit 56912fb

Please sign in to comment.