]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 27 Jul 2023 09:12:47 +0000 (11:12 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 27 Jul 2023 09:12:47 +0000 (11:12 +0200)
- check if bot_token is configured

fba/http/network.py

index 5f3e19e692d502c6c8c708b26b50b6ca98a35b98..3a72ff3e4be895868ece575e7b47a34c622c44b9 100644 (file)
@@ -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