]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 31 Mar 2024 08:00:43 +0000 (10:00 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 31 Mar 2024 08:00:43 +0000 (10:00 +0200)
- logged types (string or 'None' type)

fba/commands.py
fba/http/federation.py
fba/networks/lemmy.py
fba/networks/pleroma.py

index b951b6355f60dccd400469d16f8c1f01461263f1..31518a85252a358109dcc0b9cabd75559011d5d7 100644 (file)
@@ -572,7 +572,7 @@ def fetch_observer(args: argparse.Namespace) -> int:
             logger.debug("domain='%s' - AFTER!", domain)
 
             if domain in [None, ""]:
-                logger.debug("domain='%s' is empty after tidyup.domain() - SKIPPED!", domain)
+                logger.debug("domain[%s]='%s' is empty after tidyup.domain(): item[domain]='%s' - SKIPPED!", type(domain), domain, item["domain"])
                 continue
 
             logger.debug("domain='%s' - BEFORE!", domain)
@@ -829,7 +829,7 @@ def fetch_fba_rss(args: argparse.Namespace) -> int:
 
             logger.debug("domain='%s' - AFTER!", domain)
             if domain in [None, ""]:
-                logger.debug("domain='%s' is empty after tidyup.domain() - SKIPPED!", domain)
+                logger.debug("domain[%s]='%s' is empty after tidyup.domain() - SKIPPED!", type(domain), domain)
                 continue
 
             logger.debug("domain='%s' - BEFORE!", domain)
@@ -916,7 +916,7 @@ def fetch_fbabot_atom(args: argparse.Namespace) -> int:
 
                     logger.debug("domain='%s' - AFTER!", domain)
                     if domain in [None, ""]:
-                        logger.debug("domain='%s' is empty after tidyup.domain() - SKIPPED!", domain)
+                        logger.debug("domain[%s]='%s' is empty after tidyup.domain(): href='%s' - SKIPPED!", type(domain), domain, href)
                         continue
 
                     logger.debug("domain='%s' - BEFORE!", domain)
@@ -1124,7 +1124,7 @@ def fetch_txt(args: argparse.Namespace) -> int:
                 logger.debug("domain='%s' - AFTER!", domain)
 
                 if domain in [None, ""]:
-                    logger.debug("domain='%s' is empty after tidyup.domain() - SKIPPED!", domain)
+                    logger.debug("domain[%s]='%s' is empty after tidyup.domain() - SKIPPED!", type(domain), domain)
                     continue
                 elif not domain_helper.is_wanted(domain):
                     logger.debug("domain='%s' is not wanted - SKIPPED!", domain)
@@ -1176,7 +1176,7 @@ def fetch_fedipact(args: argparse.Namespace) -> int:
 
             logger.debug("domain='%s' - AFTER!", domain)
             if domain in [None, ""]:
-                logger.debug("domain='%s' is empty after tidyup.domain() - SKIPPED!", domain)
+                logger.debug("domain[%s]='%s' is empty after tidyup.domain(): row.contents[0]='%s' - SKIPPED!", type(domain), domain, row.contents[0])
                 continue
 
             logger.debug("domain='%s' - BEFORE!", domain)
@@ -1485,7 +1485,7 @@ def fetch_fedilist(args: argparse.Namespace) -> int:
         logger.debug("domain='%s' - AFTER!", domain)
 
         if domain in [None, ""]:
-            logger.debug("domain='%s' is empty after tidyup.domain(): row[hostname]='%s' - SKIPPED!", domain, row["hostname"])
+            logger.debug("domain[%s]='%s' is empty after tidyup.domain(): row[hostname]='%s' - SKIPPED!", type(domain), domain, row["hostname"])
             continue
 
         logger.debug("domain='%s' - BEFORE!", domain)
@@ -1648,8 +1648,8 @@ def fetch_instances_social(args: argparse.Namespace) -> int:
         domain = tidyup.domain(row["name"]) if row["name"] not in [None, ""] else None
         logger.debug("domain='%s' - AFTER!", domain)
 
-        if domain is None and domain == "":
-            logger.debug("domain='%s' is empty after tidyup.domain() - SKIPPED!", domain)
+        if domain in [None, ""]:
+            logger.debug("domain[%s]='%s' is empty after tidyup.domain() - SKIPPED!", type(domain), domain)
             continue
 
         logger.debug("domain='%s' - BEFORE!", domain)
@@ -1717,8 +1717,8 @@ def fetch_relaylist(args: argparse.Namespace) -> int:
         domain = urlparse(row["url"]).netloc.lower().split(":")[0]
         logger.debug("domain='%s' - AFTER!", domain)
 
-        if domain is None and domain == "":
-            logger.debug("domain='%s' is empty after tidyup.domain() - SKIPPED!", domain)
+        if domain [None, ""]:
+            logger.debug("domain[%s]='%s' is empty after tidyup.domain() - SKIPPED!", type(domain), domain)
             continue
 
         logger.debug("domain='%s' - BEFORE!", domain)
@@ -1853,7 +1853,7 @@ def fetch_relays(args: argparse.Namespace) -> int:
                     logger.debug("domain='%s' - AFTER!", domain)
 
                     if domain in [None, ""]:
-                        logger.debug("domain='%s' is empty after tidyup.domain() from origin='%s' - SKIPPED!", domain, row["domain"])
+                        logger.debug("domain[%s]='%s' is empty after tidyup.domain() from origin='%s' - SKIPPED!", type(domain), domain, row["domain"])
                         continue
                     elif domain not in peers:
                         logger.debug("Appending domain='%s' to peers list for relay='%s' ...", domain, row["domain"])
@@ -1895,7 +1895,7 @@ def fetch_relays(args: argparse.Namespace) -> int:
                 logger.debug("domain='%s' - AFTER!", domain)
 
                 if domain in [None, ""]:
-                    logger.debug("domain='%s' is empty after tidyup.domain() from origin='%s' - SKIPPED!", domain, row["domain"])
+                    logger.debug("domain[%s]='%s' is empty after tidyup.domain() from origin='%s' - SKIPPED!", type(domain), domain, row["domain"])
                     continue
                 elif domain not in peers:
                     logger.debug("Appending domain='%s' to peers list for relay='%s' ...", domain, row["domain"])
@@ -1919,7 +1919,7 @@ def fetch_relays(args: argparse.Namespace) -> int:
                 logger.debug("domain='%s' - AFTER!", domain)
 
                 if domain in [None, ""]:
-                    logger.debug("domain='%s' is empty after tidyup.domain() from origin='%s' - SKIPPED!", domain, row["domain"])
+                    logger.debug("domain[%s]='%s' is empty after tidyup.domain() from origin='%s' - SKIPPED!", type(domain), domain, row["domain"])
                     continue
                 elif domain not in peers:
                     logger.debug("Appending domain='%s' to peers list for relay='%s' ...", domain, row["domain"])
index fbb7f74954286d98bba516a8fcf866ca2374e54f..2aa070b5234b4e51fd151d6fb5ddc657dd39c641 100644 (file)
@@ -154,7 +154,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path:
         logger.debug("instance='%s' - AFTER!", instance)
 
         if instance in [None, ""]:
-            logger.warning("instance='%s' is empty after tidyup.domain(), domain='%s'", instance, domain)
+            logger.warning("instance[%s]='%s' is empty after tidyup.domain(), domain='%s'", type(instance), instance, domain)
             continue
         elif ".." in instance:
             logger.warning("instance='%s' contains double-dot, removing ...", instance)
index b65b28f2fd4f9fae062cb65f018dbe5c32227de2..8a9712de347f8fcb0751af0589b72936429190dc 100644 (file)
@@ -215,7 +215,7 @@ def fetch_blocks(domain: str) -> list:
                 logger.debug("blocked='%s'", blocked)
 
                 if blocked in [None, ""]:
-                    logger.warning("blocked='%s' is empty after tidyup.domain() - SKIPPED!", tag.contents[0])
+                    logger.warning("blocked[%s]='%s' is empty after tidyup.domain(): tag.contents[0]='%s' - SKIPPED!", type(blocked), blocked, tag.contents[0])
                     continue
                 elif not domain_helper.is_wanted(blocked):
                     logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
index bdccdc2997414657599f216267393a9882aeaa54..3769feec08f0611595c38894913d21514390edc5 100644 (file)
@@ -126,7 +126,7 @@ def fetch_blocks(domain: str) -> list:
                 logger.debug("blocked='%s' - AFTER!", blocked)
 
                 if blocked in [None, ""]:
-                    logger.warning("blocked='%s' is empty after tidyup.domain(): domain='%s',block_level='%s' - SKIPPED!", blocked, domain, block_level)
+                    logger.warning("blocked[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s' - SKIPPED!", blocked, domain, block_level)
                     continue
                 elif validators.domain(blocked) and blacklist.is_blacklisted(blocked):
                     logger.debug("blocked='%s' is blacklisted - SKIPPED!")
@@ -163,7 +163,7 @@ def fetch_blocks(domain: str) -> list:
             logger.debug("blocked='%s' - AFTER!", blocked)
 
             if blocked in [None, ""]:
-                logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
+                logger.warning("blocked[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s'", type(blocked), blocked, domain, block_level)
                 continue
             elif not domain_helper.is_wanted(blocked):
                 logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)
@@ -223,8 +223,8 @@ def fetch_blocks(domain: str) -> list:
 
                 logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
 
-                if blocked == "":
-                    logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
+                if blocked in [None, ""]:
+                    logger.warning("blocked[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s'", type(blocked), blocked, domain, block_level)
                     continue
 
                 logger.debug("Checking %d blockdict records ...", len(blockdict))
@@ -250,8 +250,8 @@ def fetch_blocks(domain: str) -> list:
             if blocked not in rows or "reason" not in rows[blocked]:
                 logger.warning("Cannot find blocked='%s' in rows()=%d,domain='%s' - BREAK!", blocked, len(rows), domain)
                 break
-            elif blocked == "":
-                logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
+            elif blocked in [None, ""]:
+                logger.warning("blocked[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s'", type(blocked), blocked, domain, block_level)
                 continue
 
             logger.debug("Checking %d blockdict record(s) ...", len(blockdict))