#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
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Buildbot-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/buildbot-commits

Reply via email to