From 4f73968bde2242135e5f7faaed57083b219cd630 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 1 Sep 2024 18:44:20 +0200 Subject: [PATCH] pySim.esim.saip: Don't try to generate file contents for MF/DF/ADF only EFs have data content Change-Id: I02a54a3b2f73a0e9118db87f8b514d1dbf53971f --- pySim/esim/saip/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py index 2bc270a1..4e522382 100644 --- a/pySim/esim/saip/__init__.py +++ b/pySim/esim/saip/__init__.py @@ -432,6 +432,8 @@ class File: 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)]