pull/36091/head
Trey Moen 4 days ago
parent 07455c77d8
commit d425c69c9c
  1. 16
      system/hardware/tici/esim.py

@ -32,8 +32,8 @@ class TiciLPA(LPABase):
return next((p for p in self.list_profiles() if p.enabled), None)
def delete_profile(self, iccid: str) -> None:
self._validate_iccid(iccid)
self._validate_profile_exists(iccid)
self.validate_iccid(iccid)
self.validate_profile_exists(iccid)
latest = self.get_active_profile()
if latest is not None and latest.iccid == iccid:
raise LPAError('cannot delete active profile, switch to another profile first')
@ -44,7 +44,7 @@ class TiciLPA(LPABase):
self._check_bootstrapped()
self._validate_lpa_activation_code(lpa_activation_code)
if nickname:
self._validate_nickname(nickname)
self.validate_nickname(nickname)
msgs = self._invoke('profile', 'download', '-a', lpa_activation_code)
self._validate_successful(msgs)
@ -56,15 +56,15 @@ class TiciLPA(LPABase):
self._process_notifications()
def nickname_profile(self, iccid: str, nickname: str) -> None:
self._validate_iccid(iccid)
self._validate_profile_exists(iccid)
self._validate_nickname(nickname)
self.validate_iccid(iccid)
self.validate_profile_exists(iccid)
self.validate_nickname(nickname)
self._validate_successful(self._invoke('profile', 'nickname', iccid, nickname))
def switch_profile(self, iccid: str) -> None:
self._check_bootstrapped()
self._validate_iccid(iccid)
self._validate_profile_exists(iccid)
self.validate_iccid(iccid)
self.validate_profile_exists(iccid)
latest = self.get_active_profile()
if latest and latest.iccid == iccid:
return

Loading…
Cancel
Save