From: Roland Häder Date: Mon, 17 Jul 2023 09:20:54 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=269c69319f17fe0bdc769cfe53803004c66944c4;p=fba.git Continued: - skip below code when vital elements 'domain', 'severity' are not found --- diff --git a/fba/networks/mastodon.py b/fba/networks/mastodon.py index 4b61902..1e6a20b 100644 --- a/fba/networks/mastodon.py +++ b/fba/networks/mastodon.py @@ -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