Thread (12 messages) flat view 12 messages, 2 authors, 2016-06-15
DORMANTno replies

[patch 04/11] Fix "mail" command when description contains "From" lines

From: Paolo 'Blaisorblade' Giarrusso <hidden>
Date: 2016-06-15 22:42:06
Subsystem: the rest · Maintainer: Linus Torvalds

For kernel patches, the "From" line from the email is often preserved in
the patch itself, and the one from the email is sometimes lost, so I add an
explicit one. And mail barfes on this.
Fix it up.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <redacted>
---

 stgit/commands/mail.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -122,7 +122,7 @@ def __parse_addresses(string):
         elif re.match('(to|cc|bcc):\s+', line, re.I):
             to_addr_list += __addr_list(line)
 
-    if len(from_addr_list) != 1:
+    if len(from_addr_list) == 0:
         raise CmdException, 'No "From" address'
     if len(to_addr_list) == 0:
         raise CmdException, 'No "To/Cc/Bcc" addresses'
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help