From: Roland Häder <roland@mxchange.org>
Date: Tue, 13 Jun 2023 17:20:22 +0000 (+0200)
Subject: Fixed:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=296cae28093cd9a456134de0e121691f9d856849;p=fba.git

Fixed:
- also the other way around
---

diff --git a/fba/networks/mastodon.py b/fba/networks/mastodon.py
index 32655e7..bcbfe9d 100644
--- a/fba/networks/mastodon.py
+++ b/fba/networks/mastodon.py
@@ -87,11 +87,6 @@ def fetch_blocks_from_about(domain: str) -> dict:
             instances.update_last_error(domain, exception)
             break
 
-    # DEBUG: print(f"DEBUG: doc[]='{type(doc)}'")
-    if doc is None:
-        print(f"WARNING: Cannot fetch any /about pages for domain='{domain}' - EXIT!")
-        return blocklist
-
     blocklist = {
         "Suspended servers": [],
         "Filtered media"   : [],
@@ -99,6 +94,11 @@ def fetch_blocks_from_about(domain: str) -> dict:
         "Silenced servers" : [],
     }
 
+    # DEBUG: print(f"DEBUG: doc[]='{type(doc)}'")
+    if doc is None:
+        print(f"WARNING: Cannot fetch any /about pages for domain='{domain}' - EXIT!")
+        return blocklist
+
     for header in doc.find_all("h3"):
         header_text = tidyup.reason(header.text)