From 7de12d667a82cd0f4d0f3cc6e68ebd04abfc302b Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Thu, 9 Jan 2020 13:52:41 +0100 Subject: [PATCH] mgr/orchestrator: raise_if_exception: Add exception type to message This created "better" messages, by adding `HostNotFound` as in > Exception: HostNotFound: -F /tmp/cephadm-conf-_l7f1aq8 root@blub Signed-off-by: Sebastian Wagner --- src/pybind/mgr/orchestrator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/orchestrator.py b/src/pybind/mgr/orchestrator.py index b1946863909..4e31344dcd4 100644 --- a/src/pybind/mgr/orchestrator.py +++ b/src/pybind/mgr/orchestrator.py @@ -650,7 +650,7 @@ def raise_if_exception(c): try: e = copy_to_this_subinterpreter(c.exception) except (KeyError, AttributeError): - raise Exception(str(c.exception)) + raise Exception('{}: {}'.format(type(c.exception), c.exception)) raise e -- 2.39.5