cloudnativelabs / kube-shell

Kubernetes shell: An integrated shell for working with the Kubernetes
Apache License 2.0
2.38k stars 172 forks source link

properly handle keyboard interrupt #27

Closed seregayoga closed 7 years ago

seregayoga commented 7 years ago

I added keyboard interrupt handling to fix this error Traceback (most recent call last): File "/usr/local/bin/kube-shell", line 11, in <module> sys.exit(cli()) File "/usr/local/lib/python3.6/site-packages/kubeshell/main.py", line 22, in cli kube_shell.run_cli() File "/usr/local/lib/python3.6/site-packages/kubeshell/kubeshell.py", line 175, in run_cli completer=completer) File "/usr/local/lib/python3.6/site-packages/prompt_toolkit/shortcuts.py", line 548, in prompt eventloop=eventloop) File "/usr/local/lib/python3.6/site-packages/prompt_toolkit/shortcuts.py", line 625, in run_application result = cli.run() File "/usr/local/lib/python3.6/site-packages/prompt_toolkit/interface.py", line 432, in run return self.return_value() File "/usr/local/lib/python3.6/site-packages/prompt_toolkit/interface.py", line 820, in return_value return self._return_value() File "/usr/local/lib/python3.6/site-packages/prompt_toolkit/interface.py", line 584, in keyboard_interrupt raise KeyboardInterrupt() KeyboardInterrupt

murali-reddy commented 7 years ago

Thanks @seregayoga for the patch.