From 22d89c562a3957f3f76fb719c18dc2c70ce1f736 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 3 Jan 2026 13:32:01 +0000 Subject: [PATCH] sources: Strip any excess whitespace after the comments have been removed Signed-off-by: Michael Tremer --- src/dnsbl/sources.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index 01868ac..c3fcd99 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -222,11 +222,12 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): # Add all domains for line in f: - line = line.rstrip() - # Strip any comments line, hashtag, comment = line.partition("#") + # Strip away any whitespace + line = line.strip() + # Skip the line if it is empty if not line: continue -- 2.47.3