Merge pull request #18374 from tchaikov/wip-ceph-C-d

ceph.in: do not panic at control+d in interactive mode

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Amit Kumar <amitkuma@redhat.com>
This commit is contained in:
Josh Durgin 2017-10-19 11:52:13 -07:00 committed by GitHub
commit 34951266fe

View File

@ -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]