]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/restful: do not use filter() for list 28291/head
authorKefu Chai <kchai@redhat.com>
Thu, 2 May 2019 15:02:15 +0000 (23:02 +0800)
committerBoris Ranto <branto@redhat.com>
Wed, 29 May 2019 10:23:40 +0000 (12:23 +0200)
commitf20600170093f6b20ea85ee29b2fe15b1e419425
tree9cd7bbd811157aaae5c67c8733fb8fa3b735e616
parentffa22e25e5bcfca4f5f1472589b4397bdea9dcf4
mgr/restful: do not use filter() for list

unlike python2, python3 returns an iterator instead of a list, so
construct a list using list comprehension directly.

Fixes: https://tracker.ceph.com/issues/38628
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 427bca899cb1f9ab041f4a33dfeb97a8edeb8211)
src/pybind/mgr/restful/api/mon.py
src/pybind/mgr/restful/api/request.py