]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/_ext: print 0B if option value is 0
authorKefu Chai <kchai@redhat.com>
Sun, 2 May 2021 09:50:36 +0000 (17:50 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 2 May 2021 09:50:38 +0000 (17:50 +0800)
before this change, the rendered Default is "0Ei" if the default size is 0,
would be more readable if it is "0B" or "0".

Signed-off-by: Kefu Chai <kchai@redhat.com>
doc/_ext/ceph_confval.py

index 98c5e2ff94937551540ca8b0e345f9e552c31839..437678812a6ae49ff1aad5484264a6b9b9c28c84 100644 (file)
@@ -108,6 +108,8 @@ def do_plain_num(value: str, typ: str) -> str:
 
 
 def iec_size(value: int) -> str:
+    if value == 0:
+        return '0B'
     units = dict(Ei=60,
                  Pi=50,
                  Ti=40,