aboutsummaryrefslogtreecommitdiff
path: root/b4/__init__.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-07-26 12:39:00 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2022-07-26 12:39:00 -0400
commit13c24f6d7a2965d903bd357c384a7e4d814187a6 (patch)
tree8e623973df799fe80086aa6f9152245f30c2253e /b4/__init__.py
parent78725ba63b2f48bd0f0a3f716908966773f36f8f (diff)
downloadb4-13c24f6d7a2965d903bd357c384a7e4d814187a6.tar.gz
ez-send: fix To: inclusion and address collection
Fix a logic bug that prevented the To: header from being added on --dry-run and do a better job making sure the addresses are valid and sane. Reported-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Diffstat (limited to 'b4/__init__.py')
-rw-r--r--b4/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 0bc8f27..798755c 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -2915,6 +2915,10 @@ def cleanup_email_addrs(addresses: List[Tuple[str, str]], excludes: Set[str],
gitdir: Optional[str]) -> List[Tuple[str, str]]:
global MAILMAP_INFO
for entry in list(addresses):
+ # Only qualified addresses, please
+ if not len(entry[1].strip()) or '@' not in entry[1]:
+ addresses.remove(entry)
+ continue
# Check if it's in excludes
removed = False
for exclude in excludes: