email notifications

Florian La Roche Florian.LaRoche at gmx.net
Tue Aug 31 07:54:07 UTC 2010


Hello Toshio,

koji already has a generic routing called fixEncoding() and I am currently
running koji with the patch from https://bugzilla.redhat.com/show_bug.cgi?id=614767.

Maybe your below code to use "errors='replace'" should go into the
generic koji function? (Haven't looked into this myself if it makes sense...)

regards,

Florian La Roche



> dgilmore says that we haven't applied any changes to the koji running in
> Fedora Infrastructure but that he needs to pull in a patch to hotfix our
> instance with.  Since I didn't see a patch in the upstream git repository,
> I'm attaching one here.
> 
> -Toshio

> From a3c0248a10c5ddbe9a34f76b995fbf10c34e87f5 Mon Sep 17 00:00:00 2001
> From: Toshio Kuratomi <toshio at fedoraproject.org>
> Date: Fri, 20 Aug 2010 11:17:43 -0400
> Subject: [PATCH] Fix Unicode traceback with notification email.
> 
> ---
>  builder/kojid |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/builder/kojid b/builder/kojid
> index 2f7f480..77ded36 100755
> --- a/builder/kojid
> +++ b/builder/kojid
> @@ -3455,7 +3455,10 @@ Status: %(status)s\r
>  
>          message = self.message_templ % locals()
>          # ensure message is in UTF-8
> -        message = message.encode('utf-8')
> +        if isinstance(message, unicode):
> +            message = message.encode('utf-8')
> +        else:
> +            message = unicode(message, encoding='utf8', errors='replace').encode('utf8')
>  
>          server = smtplib.SMTP(options.smtphost)
>          #server.set_debuglevel(True)
> -- 
> 1.7.2.1


More information about the buildsys mailing list