Fixed /etc/os-release parsing.

fix #399
This commit is contained in:
Antoine Nguyen
2021-11-04 10:26:02 +01:00
parent f7985a9d03
commit 04b38cf52a

View File

@@ -79,11 +79,10 @@ def dist_info():
if os.path.exists(path):
info = {}
with open(path) as fp:
while True:
l = fp.readline()
if not l:
break
key, value = l.split("=")
for line in fp.readlines():
if line == '\n':
continue
key, value = line.split("=")
value = value.rstrip('"\n')
value = value.strip('"')
info[key] = value