From: Michael Tremer Date: Wed, 10 Dec 2025 12:56:19 +0000 (+0000) Subject: sources: Log an error if we could not parse anything X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1de5471266ae6e86a420ec9ae7f0362f243fd849;p=dbl.git sources: Log an error if we could not parse anything Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index fa5d6d4..c6fdb96 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -214,6 +214,11 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): except ValueError as e: log.warning("Failed to add '%s' to the database: %s" % (domain, e)) + # Log an error if we could not detect the format + if format is None: + log.error("Format of '%s' (%s) seems to be unkown. No data could be parsed" \ + % (self, self.url)) + # The list has now been updated self.updated_at = sqlmodel.func.current_timestamp()