From: Dan Mick Date: Wed, 17 Apr 2019 04:02:11 +0000 (-0700) Subject: mgr/telemetry: change crash dict to a list X-Git-Tag: v15.1.0~2892^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F27631%2Fhead;p=ceph.git mgr/telemetry: change crash dict to a list For ease of indexing. There's no value in timestamp keys. Signed-off-by: Dan Mick --- diff --git a/src/pybind/mgr/telemetry/module.py b/src/pybind/mgr/telemetry/module.py index 99313a9c01fd..a8d8abc75323 100644 --- a/src/pybind/mgr/telemetry/module.py +++ b/src/pybind/mgr/telemetry/module.py @@ -171,7 +171,7 @@ class Module(MgrModule): return metadata def gather_crashinfo(self): - crashdict = dict() + crashlist = list() errno, crashids, err = self.remote('crash', 'do_ls', '', '') if errno: return '' @@ -180,8 +180,8 @@ class Module(MgrModule): errno, crashinfo, err = self.remote('crash', 'do_info', cmd, '') if errno: continue - crashdict[crashid] = json.loads(crashinfo) - return crashdict + crashlist.append(json.loads(crashinfo)) + return crashlist def compile_report(self): report = {