]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 17 Jul 2023 09:20:54 +0000 (11:20 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 17 Jul 2023 09:20:54 +0000 (11:20 +0200)
- skip below code when vital elements 'domain', 'severity' are not found

fba/networks/mastodon.py

index 4b6190254df7310d7db14ce8d8d79f20ad871e0c..1e6a20b52f142e27d5dc208c02d06fa6506cbd44 100644 (file)
@@ -191,9 +191,11 @@ def fetch_blocks(domain: str, nodeinfo_url: str) -> list:
                     logger.debug("block[]='%s' is of type 'dict' - SKIPPED!", type(block))
                     continue
                 elif "domain" not in block:
-                    logger.warning("block()=%d does not contain element 'domain'", len(block))
+                    logger.warning("block()=%d does not contain element 'domain' - SKIPPED!", len(block))
+                    continue
                 elif "severity" not in block:
-                    logger.warning("block()=%d does not contain element 'severity'", len(block))
+                    logger.warning("block()=%d does not contain element 'severity' - SKIPPED!", len(block))
+                    continue
 
                 reason = tidyup.reason(block["comment"]) if "comment" in block and block["comment"] is not None and block["comment"] != "" else None