laforge has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/15/38015/1
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py index 505ea30..ddb5ba0 100644 --- a/pySim/esim/saip/__init__.py +++ b/pySim/esim/saip/__init__.py @@ -385,6 +385,8 @@ return stream.getvalue()
def file_content_to_tuples(self, optimize:bool = True) -> List[Tuple]: + 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)]