laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/38015?usp=email )

Change subject: pySim.esim.saip: Don't try to generate file contents for 
MF/DF/ADF
......................................................................

pySim.esim.saip: Don't try to generate file contents for MF/DF/ADF

only EFs have data content

Change-Id: I02a54a3b2f73a0e9118db87f8b514d1dbf53971f
---
M pySim/esim/saip/__init__.py
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  dexter: Looks good to me, approved




diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index 51b9d1f..6962ee8 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -441,6 +441,8 @@
         into the asn.1 encoder.  If optimize is True, it will try to encode 
only the differences from the
         fillFileContent of the profile template.  Otherwise, the entire file 
contents will be encoded
         as-is."""
+        if not self.file_type in ['TR', 'LF', 'CY', 'BT']:
+            return []
         if not optimize:
             # simplistic approach: encode the full file, ignoring the 
template/default
             return [('fillFileContent', self.body)]

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

Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I02a54a3b2f73a0e9118db87f8b514d1dbf53971f
Gerrit-Change-Number: 38015
Gerrit-PatchSet: 6
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>

Reply via email to