From cc3c6d39d91f0d52145c0ecde91ee39a205ebcdb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 27 Jul 2023 11:12:47 +0200 Subject: [PATCH] Continued: - check if bot_token is configured --- fba/http/network.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fba/http/network.py b/fba/http/network.py index 5f3e19e..3a72ff3 100644 --- a/fba/http/network.py +++ b/fba/http/network.py @@ -192,6 +192,8 @@ def send_bot_post(domain: str, blocklist: list): raise ValueError(f"Parameter blocklist[]='{type(blocklist)}' is not of type 'list'") elif len(blocklist) == 0: raise ValueError("Parameter 'blocklist' is empty") + elif config.get("bot_token") == "": + raise ValueError("config[bot_token] is not set") message = f"{domain} has blocked the following instances:\n\n" truncated = False -- 2.39.5