Conversation
| os_release_filepath = "/etc/os-release" | ||
| if not os.path.isfile(os_release_filepath): | ||
| return ["","",""] | ||
| info = open(os_release_filepath).readlines() |
There was a problem hiding this comment.
Can this throw if we don't have the permissions?
There was a problem hiding this comment.
OS release is readable for everyone in every distro. Yes, it could throw if somebody were to lock down something as fundamental as /etc/os-release but that would be a really far-fetched corner case.
| if not distinfo[0]: | ||
| distinfo = dist_info_SLES15() | ||
| if not distinfo[0]: | ||
| distinfo = dist_info_opensuse15() |
There was a problem hiding this comment.
Seems rather inefficient. Why not have one method that figures out the distinfo?
There was a problem hiding this comment.
This fix is needed because the library we use to determine the OS and distro fails for newer distros which stopped having release files like they used to, e.g. /etc/suse-release has been dropped in newer distors in favor of /etc/os-release.
We have had to add such methods do deal with these cases since we can't rely on one single method to determine distinfo
No description provided.