laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/34038 
)

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

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
---
M pySim/runtime.py
1 file changed, 18 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved




diff --git a/pySim/runtime.py b/pySim/runtime.py
index 642e9c1..422e916 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -108,7 +108,7 @@

         # 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":

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie75613910aaba14c27420c52b6596ab080588273
Gerrit-Change-Number: 34038
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-MessageType: merged

Reply via email to