raise ValueError("Parameter block_level is empty")
if not blocks.is_instance_blocked(blocker, blocked, block_level):
- logger.debug("Invoking blocks.add_instance(%s, %s, %s, %s) ...", blocker, blocked, reason, block_level)
- blocks.add_instance(blocker, blocked, reason, block_level)
+ logger.debug("Invoking blocks.add(%s, %s, %s, %s) ...", blocker, blocked, reason, block_level)
+ blocks.add(blocker, blocked, reason, block_level)
added = True
else:
logger.debug("Updating block last seen and reason for blocker='%s',blocked='%s' ...", blocker, blocked)
logger.debug("Determined software='%s' for domain='%s'", software, domain)
elif not isinstance(software, str):
raise ValueError(f"Parameter software[]='{type(software)}' is not of type 'str'")
+ elif not isinstance(path, str) and path is not None:
+ raise ValueError(f"Parameter path[]='{type(path)}' is not of type 'str'")
logger.debug("Checking if domain='%s' is registered ...", domain)
if not instances.is_registered(domain):
logger.debug("instance='%s' is a link to a tag - SKIPPED!", instance)
continue
elif not instances.is_registered(instance):
- logger.debug("Adding new instance='%s',domain='%s',command='%s'", instance, domain, command)
- instances.add(instance, domain, command)
+ logger.debug("Fetching instance='%s',origin='%s',command='%s',path='%s' ...", instance, domain, command, path)
+ fetch_instances(instance, domain, None, command, path)
logger.debug("Invoking cookies.clear(%s) ...", domain)
cookies.clear(domain)
logger.debug("is_blocked='%s' - EXIT!", is_blocked)
return is_blocked
-def add_instance(blocker: str, blocked: str, reason: str, block_level: str):
+def add(blocker: str, blocked: str, reason: str, block_level: str):
logger.debug("blocker='%s',blocked='%s',reason='%s',block_level='%s' - CALLED!", blocker, blocked, reason, block_level)
domain_helper.raise_on(blocker)
domain_helper.raise_on(blocked)