From ff3444b34dcdf1b2231c05d7cb12f9ec8eb0f867 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 18 Nov 2023 16:42:33 +0100 Subject: [PATCH] Continued: - fixed some errors (ops) --- fba/networks/peertube.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fba/networks/peertube.py b/fba/networks/peertube.py index 81c1dc8..475982c 100644 --- a/fba/networks/peertube.py +++ b/fba/networks/peertube.py @@ -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"]) -- 2.39.5