#974: Error logging new changes with non-ascii author
-------------------+--------------------------------------------------------
Reporter: catlee | Owner:
Type: defect | Status: new
Priority: minor | Milestone: undecided
Version: 0.8.1 | Keywords:
-------------------+--------------------------------------------------------
If you have a change with a non-ascii author, it appears as if
ChangeManager can't log the new change properly:
{{{
2010-08-24 10:05:27-0400 [HTTPPageGetter,client] <unicode instance at
0x3dab6f0 with str error:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-
packages/twisted/python/reflect.py", line 546, in _safeFormat
return formatter(o)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3'
in position 20: ordinal not in range(128)
>
}}}
Updating addChange in ChangeManager to something like this seems to fix
it:
{{{
msg = "adding change, who %s, %d files, rev=%s, branch=%s,
repository=%s, " \
"comments %s, category %s" % (change.who,
len(change.files),
change.revision,
change.branch, change.repository,
change.comments,
change.category)
msg = msg.encode("utf8", "replace")
log.msg(msg)
}}}
--
Ticket URL: <http://buildbot.net/trac/ticket/974>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits