]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/iostat: use correct types
authorKefu Chai <kchai@redhat.com>
Sun, 17 Jan 2021 01:35:36 +0000 (09:35 +0800)
committerSebastian Wagner <sebastian.wagner@suse.com>
Fri, 29 Jan 2021 12:42:38 +0000 (13:42 +0100)
commit745a4e5e5e57e3139431d47e2ed51255e22768fa
treea50ebd752fb0723a95a9ba82b9e220f0f74becad
parent60cf76818101e819482cc10da0936154a33586e3
pybind/mgr/iostat: use correct types

for better readability and for the sake of correctness.

* do not cast denominator to float before diving by it
* use '//' for divding an int
* cast int to str as it will be used as an element in a list of str

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 4ffcccf6a4bbded4a240c2bf13020da1d6d6d774)
src/pybind/mgr/iostat/module.py