Ensure add_history adds unicode string

This commit is contained in:
jstenar
2012-08-17 09:12:38 +02:00
parent aacd8b5356
commit ff1dfb08f1
+1
View File
@@ -98,6 +98,7 @@ class LineHistory(object):
def add_history(self, line):
'''Append a line to the history buffer, as if it was the last line typed.'''
line = ensure_unicode(line)
if not hasattr(line, "get_line_text"):
line = lineobj.ReadLineTextBuffer(line)
if not line.get_line_text():