浏览代码

minor improvement

Tony Fernandez 7 月之前
父节点
当前提交
ffb431e3ab
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      borgmatic/hooks/zabbix.py

+ 1 - 1
borgmatic/hooks/zabbix.py

@@ -106,7 +106,7 @@ def ping_monitor(hook_config, config, config_filename, state, monitoring_log_lev
     if not dry_run:
         logging.getLogger('urllib3').setLevel(logging.ERROR)
         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:
                 response.raise_for_status()
         except requests.exceptions.RequestException as error: