laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/37846?usp=email )


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

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
---
M pySim/esim/saip/__init__.py
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/46/37846/1

diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index c622314..7ee43f7 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -371,9 +371,9 @@
         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."""

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37846?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0e6c97721fb1cfc6b5c21595d85bd374d485b573
Gerrit-Change-Number: 37846
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <[email protected]>

Reply via email to