mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
fix regular expression used in parse_key_value_pairs()
This commit is contained in:
parent
f73bd4e27e
commit
c939c5d289
@ -378,7 +378,7 @@ def format_list(items, quote=None, page_width=80):
|
||||
col += 1
|
||||
return '\n'.join(rows)
|
||||
|
||||
key_value_re = re.compile("([^\s=]+)\s*=\s*((\S+)|(?P<quote>['\\\"])((?P=quote)|(.*?[^\\\])(?P=quote)))")
|
||||
key_value_re = re.compile("(\w+)\s*=\s*(([^\s'\\\"]+)|(?P<quote>['\\\"])((?P=quote)|(.*?[^\\\])(?P=quote)))")
|
||||
def parse_key_value_pairs(input):
|
||||
''' Given a string composed of key=value pairs parse it and return
|
||||
a dict of the key/value pairs. Keys must be a word, a key must be followed
|
||||
|
Loading…
Reference in New Issue
Block a user