Open
Conversation
Now prints `\nKeyboard Interrupted`
Just prints newline and exits (modeled after the behaviour of the Python interactive console)
miningape
reviewed
Mar 30, 2022
| exit() | ||
|
|
||
| except EOFError: | ||
| print() |
Owner
There was a problem hiding this comment.
Why are we swallowing errors? Would be useful to know why the program exited for no reason
Collaborator
Author
|
EOFError is when you click CTRL-D.
…On Wed, 30 Mar 2022 at 19:37, Kyle Johnson ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/pychart/runner.py
<#60 (comment)>:
> @@ -42,7 +42,11 @@ def run_prompt():
print(result)
except KeyboardInterrupt:
- print("Keyboard Interrupt")
+ print("\nKeyboard Interrupted")
+ exit()
+
+ except EOFError:
+ print()
Why are we swallowing errors? Would be useful to know why the program
exited for no reason
—
Reply to this email directly, view it on GitHub
<#60 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANQOJNY4RJCBHY7R537ON2LVCSGOJANCNFSM5R6SCMYA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Owner
Then it should say that no? |
Collaborator
Author
I don't as I said in the commit motivation, I modeled it after the behaviour of the python interactive console. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added minor qol updates to the prompt