From: Roland Häder Date: Mon, 10 Jul 2023 17:35:39 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=521312902a9ac553d0763e615ace12ad87dc85f9;p=fba.git Continued: - cannot get len() (number of rows) from reader - instances.set_total_blocks() accepts as 2nd parameter not direct count, so let's handle the domain list --- diff --git a/fba/commands.py b/fba/commands.py index fb19264..6b63c8d 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -986,7 +986,6 @@ def fetch_oliphant(args: argparse.Namespace) -> int: blockdict = list() - logger.info("Processing %d rows ...", len(reader)) cnt = 0 for row in reader: logger.debug("row[%s]='%s'", type(row), row) @@ -1047,8 +1046,8 @@ def fetch_oliphant(args: argparse.Namespace) -> int: if reject_reports: utils.process_block(block["blocker"], domain, None, "reject_reports") - logger.debug("Invoking instances.set_total_blocks(%s, %d) ...", block["blocker"], cnt) - instances.set_total_blocks(block["blocker"], cnt) + logger.debug("Invoking instances.set_total_blocks(%s, domains()=%d) ...", block["blocker"], len(domains)) + instances.set_total_blocks(block["blocker"], domains) logger.debug("Checking if blocker='%s' has pending updates ...", block["blocker"]) if instances.has_pending(block["blocker"]):