]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 9 Dec 2023 05:01:38 +0000 (06:01 +0100)
committerRoland Häder <roland@mxchange.org>
Sat, 9 Dec 2023 05:01:38 +0000 (06:01 +0100)
- need to catch any network-related exceptions to reduce _DEPTH counter

fba/http/federation.py

index 8b1508dd0ec6af62c1817bb809ef63aa570fbc92..88a100ea8dfa0e778940af05d46bec12e54e9803 100644 (file)
@@ -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):