Convert codename to str
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user