]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 18 Nov 2023 15:42:33 +0000 (16:42 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 18 Nov 2023 15:43:05 +0000 (16:43 +0100)
- fixed some errors (ops)

fba/networks/peertube.py

index 81c1dc8251b08e0b669daacfb627f830d3cc2043..475982cd18057d779cb797005d492d87faaa259f 100644 (file)
@@ -57,8 +57,8 @@ def fetch_peers(domain: str) -> list:
             )
 
             logger.debug("data[]='%s'", type(data))
-            if "error_message" not in data:
-                logger.warning("domain='%s' causes error during API query: '%s' - SKIPPED!", domain, data['error_message'])
+            if "error_message" in data:
+                logger.warning("domain='%s' causes error during API query: '%s' - SKIPPED!", domain, data["error_message"])
                 break
             elif "data" not in data["json"]:
                 logger.warning("domain='%s' has no 'data' element returned - SKIPPED!", domain)
@@ -81,7 +81,7 @@ def fetch_peers(domain: str) -> list:
                             logger.debug("record[%s] does not contain element 'host' - SKIPPED", mode2)
                             continue
                         elif record[mode2]["host"] == domain:
-                            logger.debug("record[%s]='%s' matches domain='%s' - SKIPPED!", mode2, record[mode2]["hnost"], domain)
+                            logger.debug("record[%s]='%s' matches domain='%s' - SKIPPED!", mode2, record[mode2]["host"], domain)
                             continue
 
                         logger.debug("record[%s][host]='%s'", mode2, record[mode2]["host"])