]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 7 Sep 2024 17:14:20 +0000 (19:14 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 7 Sep 2024 17:14:20 +0000 (19:14 +0200)
- when returned value from tidyup.domain() is an empty string or None then
  always log it as a debug message

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

index 66af1ff77a522f760ee05f67a38559ec5e9aad1e..d9b04dcf21c45e77eb1dbeda4a1860c7cce0c99b 100644 (file)
@@ -849,8 +849,8 @@ def fetch_fba_rss(args: argparse.Namespace) -> int:
             logger.debug("item[%s]='%s'", type(item), item)
             domain = item.link.split("=")[1]
             domain = tidyup.domain(domain) if domain not in[None, ""] else None
-
             logger.debug("domain='%s' - AFTER!", domain)
+
             if domain in [None, ""]:
                 logger.debug("domain[%s]='%s' is empty after tidyup.domain() - SKIPPED!", type(domain), domain)
                 continue
@@ -936,8 +936,8 @@ def fetch_fbabot_atom(args: argparse.Namespace) -> int:
                 for href in element["href"].split(","):
                     logger.debug("href[%s]='%s' - BEFORE!", type(href), href)
                     domain = tidyup.domain(href) if href not in [None, ""] else None
-
                     logger.debug("domain='%s' - AFTER!", domain)
+
                     if domain in [None, ""]:
                         logger.debug("domain[%s]='%s' is empty after tidyup.domain(): href='%s' - SKIPPED!", type(domain), domain, href)
                         continue
@@ -1206,8 +1206,8 @@ def fetch_fedipact(args: argparse.Namespace) -> int:
         for row in rows:
             logger.debug("row[]='%s'", type(row))
             domain = tidyup.domain(row.contents[0]) if row.contents[0] not in [None, ""] else None
-
             logger.debug("domain='%s' - AFTER!", domain)
+
             if domain in [None, ""]:
                 logger.debug("domain[%s]='%s' is empty after tidyup.domain(): row.contents[0]='%s' - SKIPPED!", type(domain), domain, row.contents[0])
                 continue
index 71f0d57c84652a31c7d7d553af027697f3228f95..98afd1c4da61396b30e315d893d14b9354609a9e 100644 (file)
@@ -165,7 +165,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]='%s' is empty after tidyup.domain(), domain='%s'", type(instance), instance, domain)
+            logger.debug("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 d16bf6c4c01481c461f85377d0486a3f7ef03d06..c97932f55a05085a712a87d125ee2c19c6e1ae34 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]='%s' is empty after tidyup.domain(): tag.contents[0]='%s' - SKIPPED!", type(blocked), blocked, tag.contents[0])
+                    logger.debug("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 27956b306709c2e92dcdea323323410bc999ec38..981e68d93d6d89dd72525847429efb04911353f5 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]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s' - SKIPPED!", type(blocked), blocked, domain, block_level)
+                    logger.debug("blocked[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s' - SKIPPED!", type(blocked), blocked, domain, block_level)
                     continue
                 elif validators.domain(blocked, rfc_2782=True) and blacklist.is_blacklisted(blocked):
                     logger.debug("blocked='%s' is blacklisted - SKIPPED!")
@@ -155,7 +155,7 @@ def fetch_blocks(domain: str) -> list:
             logger.debug("blocked='%s' - AFTER!", blocked)
 
             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)
+                logger.debug("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)
@@ -216,7 +216,7 @@ def fetch_blocks(domain: str) -> list:
                 logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
 
                 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)
+                    logger.debug("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))
@@ -240,7 +240,7 @@ def fetch_blocks(domain: str) -> list:
             logger.debug("cleaned='%s',reason='%s' - AFTER!", cleaned, reason)
 
             if cleaned in [None, ""]:
-                logger.warning("cleaned[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s'", type(cleaned), cleaned, domain, block_level)
+                logger.debug("cleaned[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s'", type(cleaned), cleaned, domain, block_level)
                 continue
             elif blocked not in rows:
                 logger.warning("Cannot find blocked='%s' in rows()=%d: domain='%s',block_level='%s'", blocked,len(rows), domain, block_level)