[patch 10/11] Fix "stg mail" address parsing for hyphen
- From
- Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
- Date
- Sep 16, 2005, 19:35 UTC
- Message-ID
- <20050916193523.18681.46404.stgit@zion.home.lan>
- In-Reply-To
- <20050916193511.18681.24189.stgit@zion.home.lan>
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Tried sending an email cc'ing LKML - watched my postfix queue - and saw kernel@vger.kernel.org as delivery address! What had happened? StGIT didn't like "linux-kernel" ! Fix the regexp.
I just added an hyphen to both sections (yes, there are plenty of domain names including hyphens, and I tested the problem there too). Don't know if other chars are missing.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> ---
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 @@ -112,7 +112,7 @@ def __parse_addresses(string): """Return a two elements tuple: (from, [to]) """ def __addr_list(string): - return re.split('.*?([\w\.]+@[\w\.]+)', string)[1:-1:2] + return re.split('.*?([-\w\.]+@[-\w\.]+)', string)[1:-1:2] from_addr_list = [] to_addr_list = []