mirror of https://github.com/nicolargo/glances
Strip double quotes explicitly while parsing /etc/os-release
parent
842f65dbf2
commit
5c133a9571
|
@ -63,7 +63,7 @@ def _linux_os_release():
|
||||||
for line in f:
|
for line in f:
|
||||||
for key in keys:
|
for key in keys:
|
||||||
if line.startswith(key):
|
if line.startswith(key):
|
||||||
ashtray[key] = line.strip().split('=')[1][1:-1]
|
ashtray[key] = re.sub(r'^"|"$', '', line.strip().split('=')[1])
|
||||||
except (OSError, IOError):
|
except (OSError, IOError):
|
||||||
return pretty_name
|
return pretty_name
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue