forked from sim-card/pysim
1
0
Fork 0

runtime: make sure applications are always listed in the same order

When we print the profile applications. which are not registered in
EF.DIR, we use python sets to subtract the applications which were part
of EF.DIR and hence already listed. Since we use sets the order may be
arbitrary. This is so far not a problem, since the output is meant to be
read by humans, but as soon as we try to use the output for unit-test
verifications we need a consistent order (sorted)

Related: OS#6094
Change-Id: Ie75613910aaba14c27420c52b6596ab080588273
This commit is contained in:
Philipp Maier 2023-08-01 15:23:19 +02:00
parent 600e284a7b
commit d62182ca43
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class RuntimeState:
# Some card applications may not be registered in EF.DIR, we will actively
# probe for those applications
for f in set(apps_profile) - set(apps_taken):
for f in sorted(set(apps_profile) - set(apps_taken), key=str):
try:
data, sw = self.card.select_adf_by_aid(f.aid)
if sw == "9000":