]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Mon, 28 Aug 2023 12:11:50 +0000 (14:11 +0200)
committerRoland Häder <roland@mxchange.org>
Mon, 28 Aug 2023 12:11:50 +0000 (14:11 +0200)
- 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

fba/networks/peertube.py

index 951e263abf691fdb90f103f9581eb6febbcfb626..758c8dda7adeb1b4f5cc36a3cdc4c6f55b965ff5 100644 (file)
@@ -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