saip-tool: add commandline option to edit mandatory services list

Change-Id: I120b98d4b0942c26674bc1365c5711101ec95235
This commit is contained in:
Philipp Maier
2025-03-31 16:58:24 +02:00
parent 59faa02f9a
commit d5da431fd4
2 changed files with 36 additions and 0 deletions

View File

@@ -1411,6 +1411,15 @@ class ProfileElementHeader(ProfileElement):
if profile_type:
self.decoded['profileType'] = profile_type
def mandatory_service_add(self, service_name):
self.decoded['eUICC-Mandatory-services'][service_name] = None
def mandatory_service_remove(self, service_name):
if service_name in self.decoded['eUICC-Mandatory-services'].keys():
del self.decoded['eUICC-Mandatory-services'][service_name]
else:
raise ValueError("service not in eUICC-Mandatory-services list, cannot remove")
class ProfileElementEnd(ProfileElement):
type = 'end'
def __init__(self, decoded: Optional[dict] = None, **kwargs):