raise ValueError(f"Parameter command='{command}' but origin is None, please fix invoking this function.")
elif not isinstance(path, str) and path is not None:
raise ValueError(f"Parameter path[]='{type(path)}' is not of type 'str'")
+ elif path is not None and not path.startswith("/"):
+ raise ValueError(f"path='{path}' does not start with a slash")
elif _DEPTH > 0 and instances.is_recent(domain, "last_instance_fetch"):
raise ValueError(f"domain='{domain}' has recently been fetched but function was invoked")
elif software is None and not instances.is_recent(domain, "last_nodeinfo"):
try:
- logger.debug("Software for domain='%s' is not set, determining ...", domain)
+ logger.debug("Software for domain='%s',path='%s' is not set, determining ...", domain, path)
software = determine_software(domain, path)
except network.exceptions as exception:
logger.warning("Exception '%s' during determining software type", type(exception))
elif path == "":
raise ValueError("Parameter 'path' is empty")
elif not path.startswith("/"):
- raise ValueError("path='{path}' does not start with / but should")
+ raise ValueError(f"path='{path}' does not start with / but should")
software = None
raise Exception(f"domain='{domain}' is blacklisted but function was invoked")
elif not isinstance(path, str) and path is not None:
raise ValueError(f"Parameter path[]='{type(path)}' is not of type 'str'")
+ elif path is not None and not path.startswith("/"):
+ raise ValueError(f"path='{path}' does not start with a slash")
logger.debug("Fetching nodeinfo from domain='%s',path='%s' ...", domain, path)
data = nodeinfo.fetch(domain, path)