FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Encode in Statusbar.settext (Closes: #200) · bpython/bpython@8239fa3 · GitHub

Commit 8239fa3

Browse files
Sebastian Ramacher
committed
Encode in Statusbar.settext (Closes: #200)
The argument might be a unicode instance and hence we have to encode it.
1 parent 669a788 commit 8239fa3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎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)

Back | FazBrowse Home | New Git URL