Change in pysim[master]: filesystem: do not read AIDs when no apps are defined

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Mon Nov 8 15:46:25 UTC 2021


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/26162 )


Change subject: filesystem: do not read AIDs when no apps are defined
......................................................................

filesystem: do not read AIDs when no apps are defined

When the profile does not define any ADFs, then do not try to read any
AIDs. This is the case for old non UICC SIMs for example.

Change-Id: I8cfbee1d23e9f99461fa5f4fbf92c1a0929c50bf
Related: OS#5274
---
M pySim/filesystem.py
1 file changed, 7 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/62/26162/1

diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index d427ded..0387de2 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -1080,6 +1080,13 @@
     def _match_applications(self):
         """match the applications from the profile with applications on the card"""
         apps_profile = self.profile.applications
+
+        # When the profile does not feature any applications, then we are done already
+        if not apps_profile:
+            return []
+
+        # Read AIDs from card and match them against the applications defined by the
+        # card profile
         aids_card = self.card.read_aids()
         apps_taken = []
         if aids_card:

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/26162
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I8cfbee1d23e9f99461fa5f4fbf92c1a0929c50bf
Gerrit-Change-Number: 26162
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211108/3e56715b/attachment.htm>


More information about the gerrit-log mailing list