From 521312902a9ac553d0763e615ace12ad87dc85f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 10 Jul 2023 19:35:39 +0200 Subject: [PATCH] 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 --- fba/commands.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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"]): -- 2.39.5