Convert codename to str

This commit is contained in:
Antoine Nguyen
2023-09-21 09:55:23 +02:00
parent daf5338ee1
commit 9ab1b5f18e

View File

@@ -106,7 +106,7 @@ def dist_name():
def is_dist_debian_based() -> (bool, str): def is_dist_debian_based() -> (bool, str):
"""Check if current OS is Debian based or not.""" """Check if current OS is Debian based or not."""
status, codename = exec_cmd("lsb_release -c -s") status, codename = exec_cmd("lsb_release -c -s")
codename = codename.strip().lower() codename = codename.decode().strip().lower()
return codename in [ return codename in [
"bionic", "bookworm", "bullseye", "buster", "bionic", "bookworm", "bullseye", "buster",
"focal", "jammy", "jessie", "sid", "stretch", "focal", "jammy", "jessie", "sid", "stretch",