[Buildbot-commits] [Buildbot] #951: UTF-8 data in logs causes web rss feed exception
Buildbot
buildbot-devel at lists.sourceforge.net
Fri Aug 6 07:31:00 UTC 2010
#951: UTF-8 data in logs causes web rss feed exception
--------------------+-------------------------------------------------------
Reporter: AHowell | Owner: AHowell
Type: defect | Status: closed
Priority: major | Milestone: undecided
Version: 0.8.1 | Resolution: fixed
Keywords: |
--------------------+-------------------------------------------------------
Changes (by AHowell):
* status: new => closed
* resolution: => fixed
Comment:
This fixes it. Is there a better way to create unicode transformed data.
My python abilities are limited...
--- a/master/buildbot/status/web/feeds.py
+++ b/master/buildbot/status/web/feeds.py
@@ -198,8 +198,10 @@ class FeedResource(XmlResource):
except IOError:
# Probably the log file has been removed
logdata ='** log file not available **'
-
- log_lines.extend(logdata.split('\n')[-30:])
+ unilist = list()
+ for line in logdata.split('\n')[-30:]:
+ unilist.append(unicode(line,'utf-8'))
+ log_lines.extend(unilist)
bc = {}
bc['date'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT",
--
Ticket URL: <http://buildbot.net/trac/ticket/951#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list