From: Sage Weil Date: Sat, 15 Feb 2020 15:07:39 +0000 (-0600) Subject: ceph.in: fix second exception on ^C X-Git-Tag: v15.1.1~358^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4abc1ef528b66dd176c03d6d686533da1f478b67;p=ceph.git ceph.in: fix second exception on ^C ret isn't defined yet, and we know we were interrupted by the user, so use an error code appropriate for that. Fixes: https://tracker.ceph.com/issues/44157 Signed-off-by: Sage Weil --- diff --git a/src/ceph.in b/src/ceph.in index 848c1da06274..9b9012e71851 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -594,7 +594,7 @@ def do_command(parsed_args, target, cmdargs, sigdict, inbuf, verbose): sleep(parsed_args.period) except KeyboardInterrupt: print('Interrupted') - return ret, '', '' + return errno.EINTR, '', '' if ret == errno.ETIMEDOUT: ret = -ret if not outs: