forked from DGNum/stateless-uptime-kuma
fix: dict.get default is already None
This commit is contained in:
parent
ca878138a1
commit
a6904ba370
1 changed files with 3 additions and 3 deletions
|
@ -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("<title>(.*?)</title>", content)
|
||||
if m is None:
|
||||
|
|
Loading…
Reference in a new issue