Skip to content

Commit edf7b2e

Browse files
committed
Only encode docstring if it's an unicode string.
1 parent a387e8c commit edf7b2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ def lsize():
12591259
self.list_win.addstr('\n ')
12601260

12611261
if self.docstring is not None:
1262-
if not py3:
1262+
if not py3 and isinstance(docstring_string, unicode):
12631263
docstring_string = docstring_string.encode(encoding, 'ignore')
12641264
self.list_win.addstr('\n' + docstring_string,
12651265
get_colpair(self.config, 'comment'))

0 commit comments

Comments
 (0)