From: Roland Häder Date: Mon, 28 Aug 2023 12:11:50 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fc7e485f3370f3122cae4c8c4066403e984aa948;p=fba.git Continued: - also need to break the loop when no 'data' element is being returned which might be the case when the server doesn't return a JSON --- diff --git a/fba/networks/peertube.py b/fba/networks/peertube.py index 951e263..758c8dd 100644 --- a/fba/networks/peertube.py +++ b/fba/networks/peertube.py @@ -79,6 +79,9 @@ def fetch_peers(domain: str) -> list: if len(rows) < 100: logger.debug("Reached end of JSON response, domain='%s'", domain) break + else: + logger.warning("domain='%s' has no 'data' element returned - SKIPPED!", domain) + break # Continue with next row start = start + 100