From a6904ba37034e36ceae3dc3efa6e376ff20070a4 Mon Sep 17 00:00:00 2001 From: sinavir Date: Fri, 19 Apr 2024 17:19:50 +0200 Subject: [PATCH] fix: dict.get default is already None --- stateless_uptime_kuma/hydratation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stateless_uptime_kuma/hydratation.py b/stateless_uptime_kuma/hydratation.py index 569ead0..ab79c8d 100644 --- a/stateless_uptime_kuma/hydratation.py +++ b/stateless_uptime_kuma/hydratation.py @@ -15,7 +15,7 @@ def hydrate_http_probes(tree, excludes=[]): sys.exit(1) if ( probe.kwargs["type"] == MonitorType.KEYWORD - and probe.kwargs.get("keyword", None) is None + and probe.kwargs.get("keyword") is None ): logger.debug(f"Hydrating {probe.name}") if "url" not in probe.kwargs: @@ -26,8 +26,8 @@ def hydrate_http_probes(tree, excludes=[]): sys.exit(1) url = probe.kwargs["url"] method = probe.kwargs["method"] - headers = probe.kwargs.get("headers", None) - body = probe.kwargs.get("body", None) + headers = probe.kwargs.get("headers") + body = probe.kwargs.get("body") content = requests.request(method, url, headers=headers, data=body).text m = re.search("(.*?)", content) if m is None: