From 639806cc5aa97225a76ec1dc54ae687a897dd204 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Mon, 2 Sep 2024 13:52:58 +0200 Subject: [PATCH] pySim-shell: do not display 'AIDs:' when there are none The command cardinfo also displays the AIDs of the card applications. However, on classic GSM sim cards there are no applications. In this case cardinfo will still display the string 'AIDs:', but it will of course not list any AIDs under this string. Related: OS#6531 Change-Id: Ifb111ce43fdebe85d30857dfc61ab570380b68d1 --- pySim-shell.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pySim-shell.py b/pySim-shell.py index 16a6b975..4081ef94 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -826,8 +826,9 @@ class PySimCommands(CommandSet): self._cmd.poutput(" ICCID: %s" % self._cmd.rs.identity['ICCID']) self._cmd.poutput(" Class-Byte: %s" % self._cmd.lchan.scc.cla_byte) self._cmd.poutput(" Select-Ctrl: %s" % self._cmd.lchan.scc.sel_ctrl) - self._cmd.poutput(" AIDs:") - for a in self._cmd.rs.mf.applications: + if len(self._cmd.rs.mf.applications) > 0: + self._cmd.poutput(" AIDs:") + for a in self._cmd.rs.mf.applications: self._cmd.poutput(" %s" % a) @with_default_category('ISO7816 Commands')