mirror of
https://github.com/ceph/ceph
synced 2024-12-26 05:25:09 +00:00
doc/_ext: use iterator of tuple to build dict
As suggested by Ernesto Puerta <epuertat@redhat.com> Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
2c3e1926de
commit
620e318b2e
@ -162,8 +162,8 @@ class Sig:
|
||||
@staticmethod
|
||||
def _parse_arg_desc(desc):
|
||||
try:
|
||||
return {kv.split('=')[0]: kv.split('=')[1] for kv in desc.split(',') if kv}
|
||||
except IndexError:
|
||||
return dict(kv.split('=') for kv in desc.split(',') if kv)
|
||||
except ValueError:
|
||||
return desc
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user