elif software == "gitdab":
logger.debug("Setting forgejo: software='%s'", software)
software = "forgejo"
+ elif software == "mbin":
+ logger.debug("Setting kbin: software='%s'", software)
+ software = "kbin"
elif "gnu social" in software:
logger.debug("Setting gnusocial: software='%s'", software)
software = "gnusocial"
instances.set_total_peers(domain, peerlist)
logger.debug("peerlist[]='%s'", type(peerlist))
- if peerlist is None or len(peerlist) == 0:
+ if peerlist is None:
logger.warning("Cannot fetch peers: domain='%s',software='%s'", domain, software)
if instances.has_pending(domain):
_DEPTH = _DEPTH - 1
logger.debug("EXIT!")
return
+ elif len(peerlist) == 0:
+ logger.debug("domain='%s',software='%s' has an empty peer list returned - EXIT!", domain, software)
+ return
logger.info("Checking %d instance(s) from domain='%s',software='%s',depth=%d ...", len(peerlist), domain, software, _DEPTH)
for instance in peerlist:
continue
logger.debug("instance='%s' - BEFORE!", instance)
- instance = tidyup.domain(instance)
+ instance = tidyup.domain(instance) if isinstance(instance, str) and instance != "" else None
logger.debug("instance='%s' - AFTER!", instance)
- if instance == "":
- logger.warning("Empty instance after tidyup.domain(), domain='%s'", domain)
+ if instance is None or instance == "":
+ logger.warning("instance='%s' is empty after tidyup.domain(), domain='%s'", instance, domain)
continue
elif ".." in instance:
logger.warning("instance='%s' contains double-dot, removing ...", instance)
if not isinstance(software, str) and software is not None:
raise ValueError(f"Parameter software[]='{type(software)}' is not of type 'str'")
+ elif isinstance(software, str) and software == "":
+ raise ValueError("Parameter 'software' is empty")
elif software_helper.is_relay(software):
raise ValueError(f"domain='{domain}' is of software='{software}' and isn't supported here.")
elif not isinstance(origin, str) and origin is not None: