summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/cephadm/ssh.py
diff options
context:
space:
mode:
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