From: Paolo 'Blaisorblade' Giarrusso Date: Fri, 16 Sep 2005 19:35:16 +0000 (+0200) Subject: Fix "mail" command when description contains "From" X-Git-Tag: v0.14.3~674 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/24aadb3f7d7347d22c5b7afdd0b8989cccb11a9b Fix "mail" command when description contains "From" 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 --- diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index 012e640..45b2ca8 100644 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@ -127,7 +127,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'