[Buildbot-commits] [Buildbot] #2373: Exception caught notifying <buildbot.status.mail.MailNotifier

Buildbot nobody at buildbot.net
Wed Sep 19 05:47:16 UTC 2012


#2373: Exception caught notifying <buildbot.status.mail.MailNotifier
---------------------------+--------------------
Reporter:  materialdreams  |       Owner:
    Type:  defect          |      Status:  new
Priority:  major           |   Milestone:  0.8.+
 Version:  0.8.6p1         |  Resolution:
Keywords:  mail, encoding  |
---------------------------+--------------------

Comment (by materialdreams):

 Replying to [comment:1 dustin]:
 > The problem here is that log output doesn't have an encoding.  The
 !MailNotifier assumes utf-8, but that guess seems wrong in this case.
 >
 > If you know what the encoding is, you can set it where
 {{{LOG_ENCODING}}} is set near the top of mail.py.  Otherwise, you can
 change line 584 to read
 > {{{
 >             text = text.decode(LOG_ENCODING, errors='replace')
 > }}}
 >
 > Maybe we should do the latter by default?  Ideally the logs would get an
 encoding when they come *in* to buildbot, rather than being stored as
 bytestrings :(

 The suggested change solves the problem but (at least in my environment)
 the named parameter (errors) raises an exception.

 This
 {{{
 text = text.decode(LOG_ENCODING, 'replace')
 }}}
 works!

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2373#comment:2>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list