Merge pull request #23 from LostNulide/patch-1

Added new raspbian release(bookworm) to raspbian_releases
This commit is contained in:
Melissa LeBlanc-Williams 2024-04-15 14:09:51 -07:00 committed by GitHub
commit 9bd7f6a47e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -555,7 +555,14 @@ class Shell:
"""Return a string containing the raspbian version"""
if self.get_os() != "Raspbian":
return None
raspbian_releases = ("bullseye", "buster", "stretch", "jessie", "wheezy")
raspbian_releases = (
"bookworm",
"bullseye",
"buster",
"stretch",
"jessie",
"wheezy",
)
if os.path.exists("/etc/os-release"):
with open("/etc/os-release", encoding="utf-8") as f:
release_file = f.read()