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/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Nov 10 17:26:12 UTC 2021


laforge has submitted this change. ( 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(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 3caa470..3d2687f 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -1077,6 +1077,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: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211110/7f02988a/attachment.htm>


More information about the gerrit-log mailing list