If Ctrl+C was pressed at a password prompt, for example when logging into rehvm-shell, it caused rhevm-cli to crash with Traceback. This has been fixed so that if Ctrl+C is pressed at a password prompt, the operator is returned to their original Bash prompt.
Description of problem:
Sending CTRL + C signal while password prompt appears causes to rhevm-cli to fall with traceback
Version-Release number of selected component (if applicable):
rhevm-cli-3.1.0.17-1.el6ev.noarch
How reproducible:
Deterministic
Steps to Reproduce:
1.try to connect: for example: "rhevm-shell -c -l moo -u boo"
2.when password: prompt appears press CTRL+C
Actual results:
[imeerovi@imeerovi ART]$ rhevm-shell -c -l moo -u boo
Password: Traceback (most recent call last):
File "/usr/bin/rhevm-shell", line 9, in <module>
load_entry_point('rhevm-shell==3.1.0.17-SNAPSHOT', 'console_scripts', 'rhevm-shell')()
File "/usr/lib/python2.6/site-packages/ovirtcli/main.py", line 27, in main
context = OvirtCliExecutionContext(sys.argv, parser)
File "/usr/lib/python2.6/site-packages/ovirtcli/context.py", line 45, in __init__
super(OvirtCliExecutionContext, self).__init__(args=args, option_parser=option_parser)
File "/usr/lib/python2.6/site-packages/cli/context.py", line 70, in __init__
self._load_settings()
File "/usr/lib/python2.6/site-packages/cli/context.py", line 126, in _load_settings
self.__collect_connection_data()
File "/usr/lib/python2.6/site-packages/cli/context.py", line 95, in __collect_connection_data
self.settings['ovirt-shell:password'] = getpass.getpass()
File "/usr/lib64/python2.6/getpass.py", line 71, in unix_getpass
passwd = _raw_input(prompt, stream, input=input)
File "/usr/lib64/python2.6/getpass.py", line 133, in _raw_input
line = input.readline()
KeyboardInterrupt
Expected results:
controlled cli exit or some other controlled behaviou (by design)
Additional info:
The ctrl-c should be trapped and handled in all situations, as described in the duplicate.
Comment 3Michael Pasternak
2012-11-15 10:38:22 UTC
(In reply to comment #2)
> The ctrl-c should be trapped and handled in all situations, as described in
> the duplicate.
it is handled, just getpass library of my control.
Comment 4Michael Pasternak
2012-11-15 10:38:46 UTC
i've failed reproducing KeyboardInterrupt in ctrl+c, but added handling
to this use-case anyway.
4af73c9f47bacb0d6bbf37c169dc238eab6cc816
Comment 5Michael Pasternak
2012-11-15 10:46:30 UTC
(In reply to comment #2)
> The ctrl-c should be trapped and handled in all situations, as described in
> the duplicate.
btw, this is not dup., but CLOSED-NOT_A_BUG
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2013-0890.html
Description of problem: Sending CTRL + C signal while password prompt appears causes to rhevm-cli to fall with traceback Version-Release number of selected component (if applicable): rhevm-cli-3.1.0.17-1.el6ev.noarch How reproducible: Deterministic Steps to Reproduce: 1.try to connect: for example: "rhevm-shell -c -l moo -u boo" 2.when password: prompt appears press CTRL+C Actual results: [imeerovi@imeerovi ART]$ rhevm-shell -c -l moo -u boo Password: Traceback (most recent call last): File "/usr/bin/rhevm-shell", line 9, in <module> load_entry_point('rhevm-shell==3.1.0.17-SNAPSHOT', 'console_scripts', 'rhevm-shell')() File "/usr/lib/python2.6/site-packages/ovirtcli/main.py", line 27, in main context = OvirtCliExecutionContext(sys.argv, parser) File "/usr/lib/python2.6/site-packages/ovirtcli/context.py", line 45, in __init__ super(OvirtCliExecutionContext, self).__init__(args=args, option_parser=option_parser) File "/usr/lib/python2.6/site-packages/cli/context.py", line 70, in __init__ self._load_settings() File "/usr/lib/python2.6/site-packages/cli/context.py", line 126, in _load_settings self.__collect_connection_data() File "/usr/lib/python2.6/site-packages/cli/context.py", line 95, in __collect_connection_data self.settings['ovirt-shell:password'] = getpass.getpass() File "/usr/lib64/python2.6/getpass.py", line 71, in unix_getpass passwd = _raw_input(prompt, stream, input=input) File "/usr/lib64/python2.6/getpass.py", line 133, in _raw_input line = input.readline() KeyboardInterrupt Expected results: controlled cli exit or some other controlled behaviou (by design) Additional info: