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:
parent
bb137837bb
commit
3010d247ea
1 changed files with 7 additions and 0 deletions
|
|
@ -7,6 +7,13 @@ related documentation can be found in `os-release(5)`.
|
||||||
import os
|
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):
|
def parse_files(*paths):
|
||||||
"""Read Operating System Information from `os-release`
|
"""Read Operating System Information from `os-release`
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue