From 389020e14594e4894e28d1eb9103c210b142509e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 23 May 2024 18:45:13 +0200 Subject: Adding upstream version 18.2.3. Signed-off-by: Daniel Baumann --- src/pybind/mgr/cephadm/ssh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pybind/mgr/cephadm/ssh.py') diff --git a/src/pybind/mgr/cephadm/ssh.py b/src/pybind/mgr/cephadm/ssh.py index d17cc0fcc..7460fc159 100644 --- a/src/pybind/mgr/cephadm/ssh.py +++ b/src/pybind/mgr/cephadm/ssh.py @@ -1,6 +1,7 @@ import logging import os import asyncio +import concurrent from tempfile import NamedTemporaryFile from threading import Thread from contextlib import contextmanager @@ -61,7 +62,7 @@ class EventLoopThread(Thread): future = asyncio.run_coroutine_threadsafe(coro, self._loop) try: return future.result(timeout) - except asyncio.TimeoutError: + except (asyncio.TimeoutError, concurrent.futures.TimeoutError): # try to cancel the task before raising the exception further up future.cancel() raise -- cgit v1.2.3