logger.debug("Found %d record(s).", len(rows))
for record in rows:
logger.debug("record()=%d", len(record))
- for mode2 in ["follower", "following" ]:
- logger.debug("mode2='%s'", mode2)
- if mode2 in record and "host" in record[mode2]:
+ for mode2 in ["follower", "following"]:
+ logger.debug("mode=%s,mode2='%s'", mode, mode2)
+ if mode2 in record and "host" in record[mode2] and record[mode2]["host"] != domain:
logger.debug("Found mode2='%s',host='%s', adding ...", mode2, record[mode2]['host'])
peers.append(record[mode2]["host"])
- else:
- logger.warning("Record from domain='%s' has no mode2='%s' or 'host' record[]='%s", domain, mode2, type(record))
if len(rows) < 100:
logger.debug("Reached end of JSON response, domain='%s'", domain)
logger.warning("domain='%s' causes error during API query: '%s' - SKIPPED!", domain, data['error_message'])
break
- logger.debug("Returning peers[]='%s' - EXIT!", type(peers))
+ logger.debug("peers[%s]()=%d - EXIT!", type(peers), len(peers))
return peers