From: Roland Häder Date: Thu, 13 Jul 2023 10:46:52 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b7835ba713d0b484e90020f747e19093a132829d;p=fba.git Continued: - check if dict 'row' has key 'hostname' --- diff --git a/fba/commands.py b/fba/commands.py index b96ab65..47d21ed 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1562,6 +1562,11 @@ def fetch_fedilist(args: argparse.Namespace) -> int: logger.debug("reader[]='%s'", type(reader)) for row in reader: logger.debug("row[]='%s'", type(row)) + if "hostname" not in row: + logger.warning("row()=%d has no element 'hostname' - SKIPPED!", len(row)) + continue + + logger.debug("row[hostname]='%s' - BEFORE!", row["hostname"]) domain = tidyup.domain(row["hostname"]) logger.debug("domain='%s' - AFTER!", domain)