From ea96692bc8520b3d0fdba2549de069be259de87e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 19 Jul 2023 13:41:24 +0200 Subject: [PATCH] Continued: - renamed parameter --all to --force --- fba/boot.py | 6 +++--- fba/commands.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fba/boot.py b/fba/boot.py index 9778391..1830a6d 100644 --- a/fba/boot.py +++ b/fba/boot.py @@ -36,7 +36,7 @@ def init_parser(): logger.debug("Initializing parser ...") _PARSER = argparse.ArgumentParser( description="Fetches block reasons from the fediverse", - epilog="Please note that some commands have optional arguments, you may want to try fba.py --help to find them out. Please DO NOT overdose requests that are not limited by themselves. Typically parameters like --domain, --software and --all are unlimited. \"Unlimited\" here means that there is no \"is recently accessed?\" limitation.", + epilog="Please note that some commands have optional arguments, you may want to try fba.py --help to find them out. Please DO NOT overdose requests that are not limited by themselves. Typically parameters like --domain, --software and --force are unlimited. \"Unlimited\" here means that there is no \"is recently accessed?\" limitation.", ) # Generic: @@ -72,7 +72,7 @@ def init_parser(): ) parser.add_argument("--domain", help="Instance name (aka. domain)") parser.add_argument("--software", help="Name of software, e.g. 'lemmy'") - parser.add_argument("--all", action="store_true", help="Include also already existing instances, otherwise only new are checked") + parser.add_argument("--force", action="store_true", help="Include also already existing instances, otherwise only new are checked") parser.set_defaults(command=commands.recheck_obfuscation) ### Fetch blocks from registered instances or given ### @@ -180,7 +180,7 @@ def init_parser(): ) parser.set_defaults(command=commands.fetch_fedilist) parser.add_argument("--software", help="Name of software, e.g. 'lemmy'") - parser.add_argument("--all", action="store_true", help="Include also already existing instances, otherwise only new are checked") + parser.add_argument("--force", action="store_true", help="Include also already existing instances, otherwise only new are checked") ### Update nodeinfo ### parser = subparser_command.add_parser( diff --git a/fba/commands.py b/fba/commands.py index 76525c3..9bcfe20 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1431,8 +1431,8 @@ def recheck_obfuscation(args: argparse.Namespace) -> int: logger.info("Checking %d domains ...", len(rows)) for row in rows: logger.debug("Fetching peers from domain='%s',software='%s',nodeinfo_url='%s' ...", row["domain"], row["software"], row["nodeinfo_url"]) - if (args.all is None or not args.all) and instances.is_recent(row["domain"]) and args.domain is None and args.software is None: - logger.debug("row[domain]='%s' has been recently checked, args.all[]='%s' - SKIPPED!", row["domain"], type(args.all)) + if (args.force is None or not args.force) and instances.is_recent(row["domain"]) and args.domain is None and args.software is None: + logger.debug("row[domain]='%s' has been recently checked, args.force[]='%s' - SKIPPED!", row["domain"], type(args.force)) continue blocking = list() @@ -1584,8 +1584,8 @@ def fetch_fedilist(args: argparse.Namespace) -> int: if not utils.is_domain_wanted(domain): logger.warning("domain='%s' is not wanted - SKIPPED!", domain) continue - elif (args.all is None or not args.all) and instances.is_registered(domain): - logger.debug("domain='%s' is already registered, --all not specified: args.all[]='%s'", domain, type(args.all)) + elif (args.force is None or not args.force) and instances.is_registered(domain): + logger.debug("domain='%s' is already registered, --force not specified: args.force[]='%s'", domain, type(args.force)) continue elif instances.is_recent(domain): logger.debug("domain='%s' has been recently crawled - SKIPPED!", domain) -- 2.39.5