1
0
Fork 0

Merging upstream version 2.3~rc1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:53:58 +01:00
parent 972d2d9aa2
commit ca2ec6771a
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
37 changed files with 1946 additions and 407 deletions

View file

@ -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