doc/_ext: accept params separated with ", "

"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>
This commit is contained in:
Kefu Chai 2021-01-08 01:48:36 +08:00
parent 202b805aaf
commit ef281f6b55

View 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