]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/orchestrator: raise_if_exception: Add exception type to message
authorSebastian Wagner <sebastian.wagner@suse.com>
Thu, 9 Jan 2020 12:52:41 +0000 (13:52 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 10 Jan 2020 09:05:24 +0000 (10:05 +0100)
This created "better" messages, by adding `HostNotFound` as in

> Exception: HostNotFound: -F /tmp/cephadm-conf-_l7f1aq8 root@blub

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/orchestrator.py

index b1946863909dd9584b848abc6d55d9bcd9055ff8..4e31344dcd48f1e54f639f849350d6ee22d91878 100644 (file)
@@ -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