[Buildbot-commits] [Buildbot] #974: Error logging new changes with non-ascii author
Buildbot
buildbot-devel at lists.sourceforge.net
Tue Aug 24 14:17:53 UTC 2010
#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
More information about the Commits
mailing list