aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2024-02-08 13:19:11 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2024-02-08 13:22:48 -0500
commit2578d5b6f45390dce631033b20b698438455cc9f (patch)
treed6377a20c2b720f883ceea043e2b66baf05c5194
parent0fe26a3bbadfeb4a86f92b7b1e32aef203fe59f7 (diff)
downloadb4-2578d5b6f45390dce631033b20b698438455cc9f.tar.gz
am: extend trailers-ignore-from to match From: header as well
When trailers-ignore-from is defined, match not just the address specified in the trailer itself, but also the From: header of the message where the trailer comes from. This allows us to blanket-ignore all trailers from certain addresses, not just person-trailers that mention that address in the trailer content itself. Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218463 Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 06a0518..14caef7 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2209,7 +2209,7 @@ class LoreMessage:
if ltr in fixtrailers or ltr in ignored:
continue
- if ltr.addr and ltr.addr[1].lower() in ignores:
+ if (ltr.addr and ltr.addr[1].lower() in ignores) or (ltr.lmsg and ltr.lmsg.fromemail.lower() in ignores):
logger.info(' x %s', ltr.as_string(omit_extinfo=True))
ignored.add(ltr)
continue