]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/restful/api/mon.py
import ceph nautilus 14.2.2
[ceph.git] / ceph / src / pybind / mgr / restful / api / mon.py
index 341f7037769e8c8efaead30d0e230a9b53f5a143..20d0336059afaef521956434558973b6c4a37730 100644 (file)
@@ -16,15 +16,11 @@ class MonName(RestController):
         """
         Show the information for the monitor name
         """
-        mon = filter(
-            lambda x: x['name'] == self.name,
-            context.instance.get_mons()
-        )
-
+        mon = [x for x in context.instance.get_mons()
+               if x['name'] == self.name]
         if len(mon) != 1:
             response.status = 500
             return {'message': 'Failed to identify the monitor node "{}"'.format(self.name)}
-
         return mon[0]