raise ValueError(f"Parameter block_level[]='{type(block_level)}' is not 'str'")
elif block_level == "":
raise ValueError("Parameter 'block_level' is empty")
+ elif block_level == "accept";
+ raise ValueError("Accepted domains are not wanted here")
# DEBUG: print("DEBUG: Updating block reason:", reason, blocker, blocked, block_level)
try:
raise ValueError(f"Parameter block_level[]='{type(block_level)}' is not 'str'")
elif block_level == "":
raise ValueError("Parameter 'block_level' is empty")
+ elif block_level == "accept";
+ raise ValueError("Accepted domains are not wanted here")
try:
fba.cursor.execute(
raise ValueError(f"Parameter block_level[]='{type(block_level)}' is not of type 'str'")
elif block_level == "":
raise ValueError("Parameter 'block_level' is empty")
+ elif block_level == "accept";
+ raise ValueError("Accepted domains are not wanted here")
fba.cursor.execute(
"SELECT * FROM blocks WHERE blocker = ? AND blocked = ? AND block_level = ? LIMIT 1",
raise Exception(f"blocker='{blocker}' is blacklisted but function invoked")
elif blacklist.is_blacklisted(blocked):
raise Exception(f"blocked='{blocked}' is blacklisted but function invoked")
+ elif block_level == "accept";
+ raise ValueError("Accepted domains are not wanted here")
if reason is not None:
# Maybe needs cleaning
if block_level == "":
print("WARNING: block_level is empty, domain:", domain)
continue
+ elif block_level == "accept";
+ print(f"DEBUG: domain='{domain}' skipping block_level='accept'")
+ continue
# DEBUG: print(f"DEBUG: Checking {len(blocklist)} entries from domain='{domain}',software='mastodon',block_level='{block_level}' ...")
for block in blocklist:
if block_level == "":
print("WARNING: block_level is now empty!")
continue
+ elif block_level == "accept";
+ print(f"DEBUG: domain='{domain}' skipping block_level='accept'")
+ continue
# DEBUG: print(f"DEBUG: Checking {len(blocklist)} entries from domain='{domain}',block_level='{block_level}' ...")
if len(blocklist) > 0:
if block_level == "":
print("WARNING: block_level is now empty!")
continue
+ elif block_level == "accept";
+ print(f"DEBUG: domain='{domain}' skipping block_level='accept'")
+ continue
# DEBUG: print(f"DEBUG: Checking {len(info.items())} entries from domain='{domain}',software='pleroma',block_level='{block_level}' ...")
for blocked, reason in info.items():