summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/cephadm/ssh.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-23 16:45:13 +0000
commit389020e14594e4894e28d1eb9103c210b142509e (patch)
tree2ba734cdd7a243f46dda7c3d0cc88c2293d9699f /src/pybind/mgr/cephadm/ssh.py
parentAdding upstream version 18.2.2. (diff)
downloadceph-389020e14594e4894e28d1eb9103c210b142509e.tar.xz
ceph-389020e14594e4894e28d1eb9103c210b142509e.zip
Adding upstream version 18.2.3.upstream/18.2.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/pybind/mgr/cephadm/ssh.py')
-rw-r--r--src/pybind/mgr/cephadm/ssh.py3
1 files changed, 2 insertions, 1 deletions
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