From: Paolo 'Blaisorblade' Giarrusso Date: Fri, 16 Sep 2005 19:35:23 +0000 (+0200) Subject: Fix "stg mail" address parsing for hyphen X-Git-Tag: v0.14.3~668 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/e190e1a6c056b96971229940ff0bb2aef3350c0c Fix "stg mail" address parsing for hyphen From: Paolo 'Blaisorblade' Giarrusso 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 --- diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py index 9f4b3d1..a8819b5 100644 --- a/stgit/commands/mail.py +++ b/stgit/commands/mail.py @@ -117,7 +117,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 = []