From d2da0a76bf079308bfc2323b2b219e15c389022d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 1 Jul 2023 02:17:30 +0200 Subject: [PATCH] Continued: - fixed exception when pleroma block reason is None --- fba/networks/pleroma.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)}'") -- 2.39.5