]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/iostat: column_width should be int not float 22588/head
authorKefu Chai <kchai@redhat.com>
Sat, 16 Jun 2018 18:37:03 +0000 (02:37 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Jun 2018 18:37:24 +0000 (02:37 +0800)
in python3, 3/2 is a float not intger

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/mgr_module.py

index 1db2e71a425e39db33fc903fd8c6bfbf6f4f0ff1..a9c0b1b211cc34e29bc4ebb86e44cd5736818eb5 100644 (file)
@@ -364,7 +364,7 @@ class MgrModule(ceph_module.BaseMgrModule):
         :param width: the width of the terminal
         """
         n = len(elems)
-        column_width = width / n
+        column_width = int(width / n)
 
         ret = '|'
         for elem in elems:
@@ -380,7 +380,7 @@ class MgrModule(ceph_module.BaseMgrModule):
         :param width: the width of the terminal
         """
         n = len(elems)
-        column_width = width / n
+        column_width = int(width / n)
 
         # dash line
         ret = '+'