]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/crash: fix python3 invalid syntax problems
authorRicardo Dias <rdias@suse.com>
Wed, 29 Aug 2018 14:05:57 +0000 (15:05 +0100)
committerRicardo Dias <rdias@suse.com>
Wed, 29 Aug 2018 14:05:57 +0000 (15:05 +0100)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/pybind/mgr/crash/module.py

index a9f3222a03e996287417ef72c706ab687e8b1442..e6735b2c0123a2f1ac3999914544c891a1d9d54a 100644 (file)
@@ -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