Slicing of strings must be with unicode strings.

svn: r13165
This commit is contained in:
Peter Landgren 2009-09-07 20:07:05 +00:00
parent 768ea89a0f
commit f3931f0168

View File

@ -424,6 +424,8 @@ class RemoveUnused(Tool.Tool, ManagedWindow.ManagedWindow, UpdateCallback):
text = " ".join(text.split())
# if the note is too long, truncate it
# but first set type of text to unicode, otherwise the sliceing might go wrong.
text = unicode(text)
if len(text) > 80:
text = text[:80] + "..."