From: Roland Häder Date: Sat, 1 Jul 2023 00:17:30 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d2da0a76bf079308bfc2323b2b219e15c389022d;p=fba.git Continued: - fixed exception when pleroma block reason is None --- diff --git a/fba/networks/pleroma.py b/fba/networks/pleroma.py index 6082282..49ec65b 100644 --- a/fba/networks/pleroma.py +++ b/fba/networks/pleroma.py @@ -198,7 +198,7 @@ def fetch_blocks(domain: str, nodeinfo_url: str) -> list: reason = tidyup.reason(reason) elif isinstance(reason, dict) and "reason" in reason: logger.debug("reason[] is a dict") - reason = tidyup.reason(reason["reason"]) + reason = tidyup.reason(reason["reason"]) if isinstance(reason["reason"], str) else None elif reason is not None: raise ValueError(f"Cannot handle reason[]='{type(reason)}'")