From bcf0f4df2db8b51c58e5ca4d411d05e2a4d081ab Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Wed, 29 Aug 2018 15:05:57 +0100 Subject: [PATCH] mgr/crash: fix python3 invalid syntax problems Signed-off-by: Ricardo Dias --- src/pybind/mgr/crash/module.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/crash/module.py b/src/pybind/mgr/crash/module.py index a9f3222a03e99..e6735b2c0123a 100644 --- a/src/pybind/mgr/crash/module.py +++ b/src/pybind/mgr/crash/module.py @@ -45,13 +45,14 @@ class Module(MgrModule): :param f: f(time) return true to keep crash report :returns: crash reports for which f(time) returns true """ - def inner((_, meta)): + def inner(pair): + _, meta = pair meta = json.loads(meta) time = self.time_from_string(meta["timestamp"]) return f(time) matches = filter(inner, six.iteritems( self.get_store_prefix("crash/"))) - return map(lambda (k, m): (k, json.loads(m)), matches) + return [(k, json.loads(m)) for k, m in matches] # command handlers -- 2.39.5