Skip to content

Commit

Permalink
use lower() when comparing lower chars
Browse files Browse the repository at this point in the history
Just checking some code, better use good practices.

Signed-off-by: Douglas Schilling Landgraf <[email protected]>
  • Loading branch information
dougsland authored and patrickelectric committed Jan 30, 2025
1 parent e8089c3 commit 245e0e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/libs/commonwealth/commonwealth/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ def get_cpu_type() -> CpuType:
@cache
def get_host_os() -> HostOs:
os_release = load_file("/etc/os-release")
if "bookworm" in os_release:
if "bookworm" in os_release.lower():
return HostOs.Bookworm
if "bullseye" in os_release:
if "bullseye" in os_release.lower():
return HostOs.Bullseye
return HostOs.Other

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class NavigatorPi4(Navigator):
def get_serials(self) -> List[Serial]:
release = "Bullseye"
os_release = load_file("/etc/os-release")
if "bookworm" in os_release:
if "bookworm" in os_release.lower():
release = "Bookworm"

match release:
Expand Down

0 comments on commit 245e0e4

Please sign in to comment.