Skip to content

Commit

Permalink
tests: fix bluez test when no /etc/os-release
Browse files Browse the repository at this point in the history
This file doesn't exist in the Nix build sandbox.

Fixes: 812dc61 ("tests: Skip bluez test_advertise on RHEL 10")
  • Loading branch information
alyssais authored and martinpitt committed Oct 16, 2024
1 parent 1ae426c commit 4b99cff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_bluez5.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
have_bluetoothctl = shutil.which("bluetoothctl")
have_pbap_client = shutil.which("pbap-client")

el10 = "platform:el10" in Path("/etc/os-release").read_text("UTF-8")
os_release = Path("/etc/os-release")
el10 = os_release.exists() and "platform:el10" in os_release.read_text("UTF-8")


def _run_bluetoothctl(command):
Expand Down

0 comments on commit 4b99cff

Please sign in to comment.