mirror of
https://github.com/borgmatic-collective/borgmatic.git
synced 2026-08-03 15:03:02 +02:00
minor improvement
This commit is contained in:
@@ -106,7 +106,7 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev
|
|||||||
if not dry_run:
|
if not dry_run:
|
||||||
logging.getLogger('urllib3').setLevel(logging.ERROR)
|
logging.getLogger('urllib3').setLevel(logging.ERROR)
|
||||||
try:
|
try:
|
||||||
response = requests.post(base_url, headers=headers, data=json.dumps(data))
|
response = requests.post(base_url, headers=headers, json=data)
|
||||||
if not response.ok:
|
if not response.ok:
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
except requests.exceptions.RequestException as error:
|
except requests.exceptions.RequestException as error:
|
||||||
|
|||||||
Reference in New Issue
Block a user