From d6b95bab24e272d6f65eb9fe46000d26634f9cb1 Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Fri, 11 Dec 2020 18:46:29 -0800 Subject: [PATCH] install: adjustment to account for /etc/os-release that does not have an ID_LIKE field --- tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 075119a2..bdebffc1 100644 --- a/tasks.py +++ b/tasks.py @@ -100,6 +100,7 @@ class OsInfo: if not os_like: like = " ".join(like) print(f"unsupported os install type({like})") + print("trying using the -i option to specify an install type") sys.exit(1) if version: try: @@ -141,7 +142,7 @@ def get_os(install_type: Optional[str]) -> OsInfo: key, value = line.split("=") d[key] = value.strip("\"") name_value = d["ID"] - like_value = d["ID_LIKE"] + like_value = d.get("ID_LIKE", "") version_value = d["VERSION_ID"] return OsInfo.get(name_value, like_value.split(), version_value)