From d62182ca437b5434f765e89c31c0bd1bfc68a6b6 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Tue, 1 Aug 2023 15:23:19 +0200 Subject: [PATCH] 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 --- pySim/runtime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/runtime.py b/pySim/runtime.py index 642e9c19..422e916c 100644 --- a/pySim/runtime.py +++ b/pySim/runtime.py @@ -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":