Skip to content

Commit 55b9c7a

Browse files
committed
Fix TypeError when using F2 without some source
File "/usr/lib/python3.5/site-packages/bpython/cli.py", line 977, in p_key self.statusbar.message(_(e)) File "/usr/lib/python3.5/site-packages/bpython/cli.py", line 1605, in message self.settext(s) File "/usr/lib/python3.5/site-packages/bpython/cli.py", line 1655, in settext if len(s) >= self.w: TypeError: object of type 'SourceNotFound' has no len() I have used the same code as with `bpython/curtsiesfrontend/repl.py`.
1 parent 69d3480 commit 55b9c7a

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
@@ -974,7 +974,7 @@ def p_key(self, key):
974974
try:
975975
source = self.get_source_of_current_name()
976976
except repl.SourceNotFound as e:
977-
self.statusbar.message(_(e))
977+
self.statusbar.message(str(e))
978978
else:
979979
if config.highlight_show_source:
980980
source = format(PythonLexer().get_tokens(source),

0 commit comments

Comments
 (0)