update bluetooth device check for paired devices

This commit is contained in:
ekaraogullari 2024-06-12 21:29:12 +03:00
parent 2d37faf6cf
commit 193da7ae97
2 changed files with 3 additions and 2 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
.vs/
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/ __pycache__/
*.py[cod] *.py[cod]

View File

@ -659,8 +659,7 @@ def troubleshoot_bluetooth():
# List devices to see if any are connected # List devices to see if any are connected
result = subprocess.run(['bluetoothctl', 'devices'], capture_output=True, text=True) result = subprocess.run(['bluetoothctl', 'devices'], capture_output=True, text=True)
if "Device" not in result.stdout: if "Device" not in result.stdout:
print("{reset}[{red}!{reset}] {red}CRITICAL{reset}: No Compatible {blue}Bluetooth devices{reset} are connected.") print("\033[0m[\033[91m!\033[0m] \033[91mCRITICAL\033[0m: Paired \033[94mBluetooth device\033[0m not found.")
return False
# if no issues are found then continue # if no issues are found then continue
return True return True