Report generation crashes for non-ascii characters in commit messages.

Bug #1821165 reported by Robin Åstedt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TextTest
Fix Released
Undecided
Geoff Bache

Bug Description

In texttestlib/default/batch/jenkinschanges.py method parsePlainChangeLog:

Here it parses changelog.xml (When it is in plain text format) by opening it in utf-8 encoding, but then when converting from a unicode string to a byte string it specifies ascii encoding.

Proposed fix:
- self.addUnique(bugs, self.getBugs(line.encode("ascii")))
+ self.addUnique(bugs, self.getBugs(line.encode("utf-8")))

This information is then used to generate an url so perhaps it would be good to strip the string of any non-url-safe characters. But, calling line.encode("ascii") for a file opened as utf-8 is definitely wrong.

Revision history for this message
Robin Åstedt (robin.astedt) wrote :
description: updated
Revision history for this message
Geoff Bache (geoff.bache) wrote :

Thanks for the report. Have committed your fix to trunk now, will try to release it when I have looked at another possibly related problem around encodings in this area... hopefully tomorrow.

Changed in texttest:
assignee: nobody → Geoff Bache (geoff.bache)
status: New → Fix Committed
Revision history for this message
Geoff Bache (geoff.bache) wrote :

Released TextTest 3.29.4 on PyPI now.

Changed in texttest:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.