Merging upstream version 2.3~rc1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
972d2d9aa2
commit
ca2ec6771a
37 changed files with 1946 additions and 407 deletions
|
@ -29,9 +29,11 @@ def _txt2dict(txt: list):
|
|||
for list_of_chars in txt:
|
||||
try:
|
||||
string = functools.reduce(lambda accumulator, c: accumulator + chr(c), list_of_chars, '')
|
||||
key, val = string.split("=")
|
||||
the_dict[key.lower()] = val
|
||||
except Exception: # pylint: disable=broad-except
|
||||
if string.isprintable():
|
||||
key, val = string.split('=')
|
||||
if key: # Make sure the key is not an empty string
|
||||
the_dict[key.lower()] = val
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
return the_dict
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue