From: Roland Häder Date: Sat, 9 Dec 2023 05:01:38 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f7c698ec6681eabf3519cb02962fdc705b0f38f2;p=fba.git Continued: - need to catch any network-related exceptions to reduce _DEPTH counter --- diff --git a/fba/http/federation.py b/fba/http/federation.py index 8b1508d..88a100e 100644 --- a/fba/http/federation.py +++ b/fba/http/federation.py @@ -107,8 +107,12 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path: peerlist = list() logger.debug("software='%s'", software) if software is not None: - logger.debug("Fetching instances for domain='%s',software='%s',origin='%s'", domain, software, origin) - peerlist = fetch_peers(domain, software, origin) + try: + logger.debug("Fetching instances for domain='%s',software='%s',origin='%s'", domain, software, origin) + peerlist = fetch_peers(domain, software, origin) + except network.exceptions as exception: + _DEPTH = _DEPTH - 1 + raise exception logger.debug("peerlist[]='%s'", type(peerlist)) if isinstance(peerlist, list):