mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
ceph.in: do not panic at control+d in interactive mode
Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
2e1e3f8b2f
commit
c05060fb9b
@ -539,7 +539,11 @@ def new_style_command(parsed_args, cmdargs, target, sigdict, inbuf, verbose):
|
||||
import readline # noqa
|
||||
|
||||
while True:
|
||||
interactive_input = read_input()
|
||||
try:
|
||||
interactive_input = read_input()
|
||||
except EOFError:
|
||||
# leave user an uncluttered prompt
|
||||
return 0, '\n', ''
|
||||
if interactive_input is None:
|
||||
return 0, '', ''
|
||||
cmdargs = parse_cmdargs(shlex.split(interactive_input))[2]
|
||||
|
Loading…
Reference in New Issue
Block a user