pySim.esim.saip: Fix key used in FsProfileElement.files2pe

The self.files member is a dict.  Hence we should use those dict
keys when [re]building the decoded dict. The previous code ignored
it and re-constructed the key from File.pe_name - but that's not
always identical.

Change-Id: I0e6c97721fb1cfc6b5c21595d85bd374d485b573
This commit is contained in:
Harald Welte
2024-08-17 10:12:58 +02:00
parent ab3e04fdb1
commit 39613da6a7

View File

@@ -371,9 +371,9 @@ class FsProfileElement(ProfileElement):
self.files[file.pe_name] = file
def files2pe(self):
"""Update the "decoded" member with the contents of the files member."""
for f in self.files:
self.decoded[f.pename] = f.to_tuples()
"""Update the "decoded" member with the contents of the "files" member."""
for k, f in self.files.items():
self.decoded[k] = f.to_tuples()
def pe2files(self):
"""Update the "files" member with the contents of the "decoded" member."""