]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: split the argdesc pair at the first '='
authorKefu Chai <kchai@redhat.com>
Thu, 11 Feb 2021 18:05:00 +0000 (02:05 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 13 Feb 2021 02:18:58 +0000 (10:18 +0800)
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 <kchai@redhat.com>
doc/_ext/ceph_commands.py

index f1d7ee606fec3ce8c02ed12e1b4ef7194e5e52f6..e0f1090be35b744504b8e6beebfdb1acd1221623 100644 (file)
@@ -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