From: Roland Häder Date: Tue, 13 Jun 2023 10:08:11 +0000 (+0200) Subject: Fixed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=34900cdfb1ccc7edfb4b2e1eaf0359524a8fab51;p=fba.git Fixed: - some instances have broken API at /api/v1/instance/domain_blocks which returns nodeinfo (see masto1.iana.de) --- diff --git a/fba/networks/mastodon.py b/fba/networks/mastodon.py index 6470292..32655e7 100644 --- a/fba/networks/mastodon.py +++ b/fba/networks/mastodon.py @@ -189,6 +189,12 @@ def fetch_blocks(domain: str, origin: str, nodeinfo_url: str): if len(blocklist) > 0: print(f"INFO: Checking {len(blocklist)} entries from domain='{domain}',software='mastodon' ...") for block in blocklist: + # Check type + # DEBUG: print(f"DEBUG: block[]='{type(block)}'") + if not isinstance(block, dict): + print(f"DEBUG: block[]='{type(block)}' is of type 'dict' - SKIPPED!") + continue + # Map block -> entry # DEBUG: print(f"DEBUG: block[{type(block)}]='{block}'") entry = {