From cd19320034b89cc869837a68b89da6925e1addeb Mon Sep 17 00:00:00 2001 From: Trey Moen Date: Tue, 20 May 2025 19:29:10 -0700 Subject: [PATCH] simpler --- system/hardware/tici/esim.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/system/hardware/tici/esim.py b/system/hardware/tici/esim.py index 4870cf601d..c957bd4de3 100755 --- a/system/hardware/tici/esim.py +++ b/system/hardware/tici/esim.py @@ -32,7 +32,6 @@ class LPA2: for profile in msgs[-1]['payload']['data']: profiles.append({ 'iccid': profile['iccid'], - 'isdp_aid': profile['isdpAid'], 'nickname': profile['profileNickname'], 'enabled': profile['profileState'] == 'enabled', 'provider': profile['serviceProviderName'], @@ -41,11 +40,7 @@ class LPA2: return profiles def get_active_profile(self) -> dict[str, str] | None: - profiles = self.list_profiles() - for profile in profiles: - if profile['enabled']: - return profile - return None + return next((p for p in self.list_profiles() if p['enabled']), None) def process_notifications(self) -> None: """