From ff1dfb08f1be2664f2cb4754cd24128a4ee75430 Mon Sep 17 00:00:00 2001 From: jstenar Date: Fri, 17 Aug 2012 09:12:38 +0200 Subject: [PATCH] Ensure add_history adds unicode string --- pyreadline/lineeditor/history.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyreadline/lineeditor/history.py b/pyreadline/lineeditor/history.py index c9f4850..1730cce 100644 --- a/pyreadline/lineeditor/history.py +++ b/pyreadline/lineeditor/history.py @@ -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():