Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix TypeError when using F2 without some source #614
Merged
Conversation
55b9c7a
to
d1fe7e9
bpython/cli.py
Outdated
| @@ -974,7 +974,7 @@ def p_key(self, key): | |||
| try: | |||
| source = self.get_source_of_current_name() | |||
| except repl.SourceNotFound as e: | |||
| self.statusbar.message(_(e)) | |||
| self.status_bar.message('%s' % (e, )) | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
blueyed
May 31, 2016
Author
Contributor
That's what I had before, but then found the code in bpython/curtsiesfrontend/repl.py doing this.
Let's change both to use str then?
|
Changing both to |
|
Do you want that to be in two commits? |
|
I don't have a strong preference either way. |
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()
This also adjust the string formatting in `bpython/curtsiesfrontend/repl.py`.
d1fe7e9
to
325d3bb
|
Done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
blueyed commentedMay 31, 2016
I have used the same code as with
bpython/curtsiesfrontend/repl.py.