]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr: fixes python error handling 21005/head
authorRicardo Dias <rdias@suse.com>
Thu, 22 Mar 2018 12:07:24 +0000 (12:07 +0000)
committerRicardo Dias <rdias@suse.com>
Mon, 26 Mar 2018 14:17:15 +0000 (15:17 +0100)
commit072699d863e5586d72c166464998e523a51cb29d
treeef73b4480a59f0edf46ce73353f4c552f2d2603e
parenta392e612cc922f9e125e8534d79f1069c34013ab
mgr: fixes python error handling

The current `handle_pyerror` function implementation relies in the
`traceback.format_exception_only` python function to format the
exception object. The problem is that this python function might also
raise an exception. This commit fixes it by enclosing that python
function call in try...catch block.

Fixes: http://tracker.ceph.com/issues/23406
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/mgr/PyModule.cc