#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
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits

Reply via email to