ts_31_102: service annotations for DF.{5GS,WLAN,HNB}
We had service annotations only for ADF.USIM so far, but not for
the related sub-directories.
Change-Id: Iaa56a26ba53eaf18fce14845ae07a27c52a2c58a
Note: The code doesn't make use of them in any reasonable way yet!
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 95f792a..dd80071 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -302,7 +302,13 @@
"File with given name %s already exists in %s" % (child.name, self))
self.children[child.fid] = child
child.parent = self
+ # update the service -> file relationship table
self._add_file_services(child)
+ if isinstance(child, CardDF):
+ for c in child.children.values():
+ self._add_file_services(c)
+ if isinstance(c, CardDF):
+ raise ValueError('TODO: implement recursive service -> file mapping')
def add_files(self, children: Iterable[CardFile], ignore_existing: bool = False):
"""Add a list of child (DF/EF) to this DF