[Reportbug-maint] Bug#848692: reportbug fails with punctuation in name

Sandro Tosi morph at debian.org
Thu Jan 5 00:15:07 UTC 2017


On Wed, Dec 21, 2016 at 9:24 PM, brian m. carlson
<sandals at crustytoothpaste.net> wrote:
> The issue is this code:
>
>     if re.match(r'[\w\s]+
> , realname):
>         return '%s <%s>' % (realname, email)
>
>     addr = email.utils.formataddr((realname, email))
>
> We don't take the branch since “.” (and “'”, etc.) are not in [\w\s],
> and then we throw an exception as email is not the module imported at
> the top, but the local variable.


I just removed that first if, as email.utils.formataddr() is more than
able to deal with all the special cases, we dont need to do that too,
thx!

-- 
Sandro "morph" Tosi
My website: http://sandrotosi.me/
Me at Debian: http://wiki.debian.org/SandroTosi
G+: https://plus.google.com/u/0/+SandroTosi



More information about the Reportbug-maint mailing list