Skip to content

Commit 8239fa3

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.
1 parent 669a788 commit 8239fa3

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy