From: Ricardo Dias Date: Wed, 29 Aug 2018 14:05:57 +0000 (+0100) Subject: mgr/crash: fix python3 invalid syntax problems X-Git-Tag: v14.0.1~445^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bcf0f4df2db8b51c58e5ca4d411d05e2a4d081ab;p=ceph.git mgr/crash: fix python3 invalid syntax problems Signed-off-by: Ricardo Dias --- diff --git a/src/pybind/mgr/crash/module.py b/src/pybind/mgr/crash/module.py index a9f3222a03e..e6735b2c012 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