### Fetch blocks from oliphant's GIT repository ###
parser = subparser_command.add_parser(
"fetch_oliphant",
- help="Fetches CSV files (block recommendations) for more possible instances to disover",
+ help="Fetches CSV files from GIT generated by Oliphant 'member instances'.",
)
parser.set_defaults(command=commands.fetch_oliphant)
parser.add_argument("--domain", help="Instance name (aka. domain) to check")
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 reason is not None and reason == "":
+ raise Exception(f"blocker='{blocker}',blocked='{blocked}',block_level='{block_level}' has empty (not 'None') block reason set")
if reason is not None:
# Maybe needs cleaning
logger.debug("Determined software='%s'", software)
if software == "lemmy" and domain.find("/c/") > 0:
domain = domain.split("/c/")[0]
+
+ logger.debug("domain='%s' - LEMMY /c/ !", domain)
if is_registered(domain):
logger.warning("domain='%s' already registered after cutting off user part. - EXIT!", domain)
return
logger.warning("Deleting row[%s]='%s' as translated='%s' already exist", column, row[column], translated)
database.cursor.execute(f"DELETE FROM instances WHERE {column} = ? LIMIT 1", [row[column]])
else:
+ logger.debug("Updating row[%s]='%s' to translated='%s' ...", column, row[column], translated)
database.cursor.execute(f"UPDATE instances SET {column} = ? WHERE {column} = ? LIMIT 1", [translated, row[column]])
logger.debug("Invoking commit() ...")