X Tutup
Skip to content

Commit bd9d9b1

Browse files
committed
Encode item in show_list() before calling addstr().
1 parent 5cb82a5 commit bd9d9b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bpython/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,8 @@ def lsize():
822822
color = get_colpair('operator')
823823
else:
824824
color = get_colpair('main')
825+
if not py3:
826+
i = i.encode(getpreferredencoding())
825827
self.list_win.addstr(i + padding, color)
826828
if ((cols == 1 or (ix and not (ix+1) % cols))
827829
and ix + 1 < len(v_items)):

0 commit comments

Comments
 (0)
X Tutup