Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canceling (Control-c) a command produces noisy output #28

Closed
jdunk opened this issue May 7, 2015 · 2 comments
Closed

Canceling (Control-c) a command produces noisy output #28

jdunk opened this issue May 7, 2015 · 2 comments

Comments

@jdunk
Copy link

jdunk commented May 7, 2015

If I'm not mistaken, canceling CTRL+c should produce no output like most/all other commands.

Currently, this is what happens (on Ubuntu bash 4.2 at least, untested elsewhere) :

$ grep -ir 'foo' . | fpp
^CTraceback (most recent call last):
  File "/usr/local/PathPicker/src/processInput.py", line 144, in <module>
    doProgram()
  File "/usr/local/PathPicker/src/processInput.py", line 120, in doProgram
    lineObjs = getLineObjs()
  File "/usr/local/PathPicker/src/processInput.py", line 102, in getLineObjs
    inputLines = sys.stdin.readlines()
KeyboardInterrupt
Nothing to do!
:D
@pcottle pcottle closed this as completed in 79b3d25 May 8, 2015
@pcottle
Copy link
Contributor

pcottle commented May 8, 2015

Stack overflow to the rescue:
http://stackoverflow.com/questions/1112343/how-do-i-capture-sigint-in-python

haha :D that should fix the stacktrace spew, thanks @jdunk ! this was annoying me too, glad you filed. 🎉

@jdunk
Copy link
Author

jdunk commented May 10, 2015

@pcottle Nice, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants