From: Roland Häder Date: Thu, 27 Jul 2023 09:12:47 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cc3c6d39d91f0d52145c0ecde91ee39a205ebcdb;p=fba.git Continued: - check if bot_token is configured --- 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