From: Roland Häder Date: Sun, 25 Jun 2023 16:41:05 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c843f967b83ca0edafc86843b21351044f1d1e4d;p=fba.git Continued: - if peers list is empty, try to fetch from /instances --- diff --git a/fba/networks/lemmy.py b/fba/networks/lemmy.py index f589664..37cf8cc 100644 --- a/fba/networks/lemmy.py +++ b/fba/networks/lemmy.py @@ -70,8 +70,9 @@ def fetch_peers(domain: str, origin: str) -> list: logger.debug("Marking domain='%s' as successfully handled ...") instances.set_success(domain) - else: - logger.warning("JSON response does not contain 'federated_instances', domain='%s' - trying /instances ...", domain) + + if len(peers) == 0: + logger.warning("Fetching instances for domain='%s' from /instances ...", domain) peers = fetch_instances(domain, origin) except network.exceptions as exception: