laforge has uploaded this change for review.

View Change

pySim.esim.saip.ProfileElementGFM: Initialize 'fileManagementCMD'

When constructing a ProfileElmentGFM from scratch, initialize the
decoded['fileManagementCMD'], as it is a mandatory member during
ASN.1 encode.

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

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/13/38013/1
diff --git a/pySim/esim/saip/__init__.py b/pySim/esim/saip/__init__.py
index 88d7755..658810a 100644
--- a/pySim/esim/saip/__init__.py
+++ b/pySim/esim/saip/__init__.py
@@ -622,6 +622,9 @@
# indexed by PE-Name
self.files = {}
self.tdef = asn1.types['ProfileElement'].type.name_to_member[self.type]
+ if decoded:
+ return
+ self.decoded['fileManagementCMD'] = []

def supports_file_for_path(self, path: Path, adf: Optional[str] = None) -> bool:
"""Does this ProfileElement support a file of given path?"""

To view, visit change 38013. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Iaae99348d36b7f0c739daf039d6ea2305b7ca9db
Gerrit-Change-Number: 38013
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge@osmocom.org>