From: Kefu Chai Date: Thu, 11 Feb 2021 18:05:00 +0000 (+0800) Subject: doc: split the argdesc pair at the first '=' X-Git-Tag: v17.1.0~2986^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a3153bd53f2854f8f02d681fdb20cc759d721854;p=ceph.git doc: split the argdesc pair at the first '=' there is chance that the value of of the argdesc's kv pair contains "=". for instance, the goodchars regexp could contain '='. so we should stop at the first '='. this change fixes the parsing of "osd pool application set" command. Signed-off-by: Kefu Chai --- diff --git a/doc/_ext/ceph_commands.py b/doc/_ext/ceph_commands.py index f1d7ee606fec..e0f1090be35b 100644 --- a/doc/_ext/ceph_commands.py +++ b/doc/_ext/ceph_commands.py @@ -162,7 +162,7 @@ class Sig: @staticmethod def _parse_arg_desc(desc): try: - return dict(kv.split('=') for kv in desc.split(',') if kv) + return dict(kv.split('=', 1) for kv in desc.split(',') if kv) except ValueError: return desc