ceph_argparse: make command ceph acceph SIGINT.

If no --connect-timeout point and there is no ceph.conf, the command
'ceph -s' can't stop by ctrl+c.
This introduced by commit 4d8fc26c8
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
This commit is contained in:
Jianpeng Ma 2019-01-03 14:34:43 +08:00
parent 0e1cdcd949
commit 8c85553357

View File

@ -1287,7 +1287,7 @@ class RadosThread(threading.Thread):
def run_in_thread(func, *args, **kwargs):
interrupt = False
timeout = kwargs.pop('timeout', 0)
if timeout == 0:
if timeout == 0 or timeout == None:
# python threading module will just get blocked if timeout is `None`,
# otherwise it will keep polling until timeout or thread stops.
timeout = 2 ** 32