From 70ba69b11650e3ce46a0d89b48a2286ff3748357 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Thu, 9 Apr 2026 18:28:35 +0545 Subject: [PATCH] enhancements(modules/controlcenter): Safely access device.connection and device.paired attributes using getattr with default False --- modules/controlcenter/bluetooth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/controlcenter/bluetooth.py b/modules/controlcenter/bluetooth.py index 0b2584e..10fc050 100644 --- a/modules/controlcenter/bluetooth.py +++ b/modules/controlcenter/bluetooth.py @@ -126,8 +126,8 @@ class BluetoothDeviceSlot(CenterBox): try: # Update connection and pairing status new_styles = [ - "connected" if self.device.connected else "", - "paired" if self.device.paired else "", + "connected" if getattr(self.device, "connected", False) else "", + "paired" if getattr(self.device, "paired", False) else "", ] self.styles = new_styles