]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/crash: fix python3 invalid syntax problems 29029/head
authorRicardo Dias <rdias@suse.com>
Wed, 29 Aug 2018 14:05:57 +0000 (15:05 +0100)
committerSage Weil <sage@redhat.com>
Fri, 12 Jul 2019 18:58:46 +0000 (13:58 -0500)
Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit bcf0f4df2db8b51c58e5ca4d411d05e2a4d081ab)

src/pybind/mgr/crash/module.py

index a4f6ecd79bcda4a02a09db17c4f0e5b39191b1b5..cbc51f65c21365e58a5fc0eb75e2716a3f71863b 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