elif domain == "":
raise ValueError("Parameter 'domain' is empty")
elif domain in _cache["raise_on"]:
- logger.debug("Returning cached is_found='%s' - EXIT!", _cache["raise_on"][domain])
+ logger.debug("Returning cached raised_on='%s' - EXIT!", _cache["raise_on"][domain])
return _cache["raise_on"][domain]
elif domain.lower() != domain:
raise ValueError(f"Parameter domain='{domain}' must be all lower-case")
elif url == "":
raise ValueError("Parameter 'url' is empty")
elif domain + url in _cache["is_in_url"]:
- logger.debug("Returning cached is_found='%s' - EXIT!", _cache["is_in_url"][domain + url])
+ logger.debug("Returning cached is_in_url='%s' - EXIT!", _cache["is_in_url"][domain + url])
return _cache["is_in_url"][domain + url]
punycode = domain.encode("idna").decode("utf-8")
elif software == "":
raise ValueError("Parameter 'software' is empty")
elif software in _cache["alias"]:
- logger.debug("Returning cached value='%s' for function 'alias' - EXIT!", _cache["alias"][software])
+ logger.debug("Returning cached alias='%s' - EXIT!", _cache["alias"][software])
return _cache["alias"][software]
key = software
def strip_powered_by(software: str) -> str:
logger.debug("software='%s' - CALLED!", software)
+
if not isinstance(software, str):
raise ValueError(f"Parameter software[]='{type(software)}' is not of type 'str'")
elif software == "":
def is_relay(software: str) -> bool:
logger.debug("software='%s'- CALLED!", software)
- if not isinstance(software, str) and software is not None:
+ if not isinstance(software, str):
raise ValueError(f"software[]='{type(software)}' is not type 'str'")
+ elif software == "":
+ raise ValueError("Parameter 'software' is empty")
found = software in relays