Skip to content

Commit fba1ed2

Browse files
author
Sebastian Ramacher
committed
Encode in Statusbar.settext (Closes: #200)
The argument might be a unicode instance and hence we have to encode it. --HG-- branch : 0.10-bugfix
1 parent ce22b29 commit fba1ed2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bpython/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,9 @@ def settext(self, s, c=None, p=False):
15111511
self.c = c
15121512

15131513
if s:
1514+
if not py3 and isinstance(s, unicode):
1515+
s = s.encode(getpreferredencoding())
1516+
15141517
if self.c:
15151518
self.win.addstr(s, self.c)
15161519
else:

0 commit comments

Comments
 (0)