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
This commit is contained in:
Philipp Maier 2021-11-08 15:32:23 +01:00
parent 5af7bdf5c7
commit d454fe7843
1 changed files with 7 additions and 0 deletions

View File

@ -1077,6 +1077,13 @@ class RuntimeState(object):
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: