]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/_ext: accept params separated with ", " 38807/head
authorKefu Chai <kchai@redhat.com>
Thu, 7 Jan 2021 17:48:36 +0000 (01:48 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 8 Jan 2021 03:35:42 +0000 (11:35 +0800)
"mon enable_stretch_mode" command's arg descriptors are delimited with
", ", so we should ignore empty kv when split the params with ",".

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

index 234c5e5833d2751267e9b0fb353a300afa8ad73b..39dcde08822ad233fb4ced4b032fa4a9717a48c3 100644 (file)
@@ -164,7 +164,7 @@ class Sig:
     @staticmethod
     def _param_to_sig(p):
         try:
-            return {kv.split('=')[0]: kv.split('=')[1] for kv in p.split(',')}
+            return {kv.split('=')[0]: kv.split('=')[1] for kv in p.split(',') if kv}
         except IndexError:
             return p