util/osrelease: add default os-release paths

Add a new `DEFAULT_PATHS` constant, a list of all well known paths
where `os-release` can be found, as per os-release(5).
This commit is contained in:
Christian Kellner 2020-10-20 17:51:34 +02:00 committed by David Rheinsberg
parent bb137837bb
commit 3010d247ea

View file

@ -7,6 +7,13 @@ related documentation can be found in `os-release(5)`.
import os
# The default paths where os-release is located, as per os-release(5)
DEFAULT_PATHS = [
"/etc/os-release",
"/usr/lib/os-release"
]
def parse_files(*paths):
"""Read Operating System Information from `os-release`