]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: fix second exception on ^C
authorSage Weil <sage@redhat.com>
Sat, 15 Feb 2020 15:07:39 +0000 (09:07 -0600)
committerSage Weil <sage@redhat.com>
Sat, 15 Feb 2020 15:07:39 +0000 (09:07 -0600)
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 <sage@redhat.com>
src/ceph.in

index 848c1da06274f2cdde6b0a550bfbdd62ef5f97f3..9b9012e7185149088114a5051b5a59e1bffe0a2e 100755 (executable)
@@ -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: