From: Sebastian Wagner Date: Thu, 9 Jan 2020 12:52:41 +0000 (+0100) Subject: mgr/orchestrator: raise_if_exception: Add exception type to message X-Git-Tag: v15.1.0~237^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=7de12d667a82cd0f4d0f3cc6e68ebd04abfc302b;p=ceph-ci.git 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 --- 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