]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/crash: nicely format 'crash info' output
authorSage Weil <sage@redhat.com>
Fri, 12 Jul 2019 21:23:17 +0000 (16:23 -0500)
committerSage Weil <sage@redhat.com>
Fri, 15 Nov 2019 14:33:44 +0000 (08:33 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 35f15f87cb936705f77ed1ca1ecaad796e021e7a)

src/pybind/mgr/crash/module.py

index 7330cad5ffb92b4fae8540fb686fec94400cb78e..af8ccf0e22f7fe648fdcadab4a7ad6b4593d5497 100644 (file)
@@ -62,6 +62,7 @@ class Module(MgrModule):
         val = self.get_store(key)
         if not val:
             return errno.EINVAL, '', 'crash info: %s not found' % crashid
+        val = json.dumps(json.loads(val), indent=4)
         return 0, val, ''
 
     def do_post(self, cmd, inbuf):