From: Roland Häder Date: Sat, 20 May 2023 14:30:40 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=668ba5721107dcb565865647a31bf9bab508446b;p=fba.git Continued: - it is more the originator ... --- diff --git a/blocks_empty.db b/blocks_empty.db index 14ad7e8..457b338 100644 Binary files a/blocks_empty.db and b/blocks_empty.db differ diff --git a/fba.py b/fba.py index 8c708e9..4468b80 100644 --- a/fba.py +++ b/fba.py @@ -233,22 +233,22 @@ def block_instance(blocker: str, blocked: str, reason: str, block_level: str, fi print("ERROR: failed SQL query:", blocker, blocked, reason, block_level, first_added, last_seen) sys.exit(255) -def add_instance(domain: str, origin: str): - # NOISY-DEBUG: print("DEBUG: domain,origin:", domain, origin) +def add_instance(domain: str, originator: str): + # NOISY-DEBUG: print("DEBUG: domain,originator:", domain, originator) if domain.find("@") > 0: print("WARNING: Bad domain name:", domain) raise - elif origin is not None and origin.find("@") > 0: - print("WARNING: Bad origin name:", origin) + elif originator is not None and originator.find("@") > 0: + print("WARNING: Bad originator name:", originator) raise - print("--- Adding new instance:", domain, origin) + print("--- Adding new instance:", domain, originator) try: c.execute( - "INSERT INTO instances (domain,origin,hash,software) VALUES (?, ?, ?, ?)", + "INSERT INTO instances (domain,originator,hash,software) VALUES (?, ?, ?, ?)", ( domain, - origin, + originator, get_hash(domain), determine_software(domain) ), diff --git a/fetch_instances.py b/fetch_instances.py index 9237fc1..e4a9f5a 100644 --- a/fetch_instances.py +++ b/fetch_instances.py @@ -4,8 +4,8 @@ import json import time import fba -def fetch_instances(domain: str, origin: str): - # NOISY-DEBUG: print("DEBUG: Fetching instances for domain:", domain, origin) +def fetch_instances(domain: str, originator: str): + # NOISY-DEBUG: print("DEBUG: Fetching instances for domain:", domain, originator) peerlist = fba.get_peers(domain) if (peerlist is None): @@ -16,8 +16,8 @@ def fetch_instances(domain: str, origin: str): ) if fba.c.fetchone() == None: - # NOISY-DEBUG: print("DEBUG: Adding new domain:", domain, origin) - fba.add_instance(domain, origin) + # NOISY-DEBUG: print("DEBUG: Adding new domain:", domain, originator) + fba.add_instance(domain, originator) fba.conn.commit() return