laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/38000?usp=email )
Change subject: pySim-shell: do not display 'AIDs:' when there are none ......................................................................
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 --- M pySim-shell.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/pySim-shell.py b/pySim-shell.py index 16a6b97..4081ef9 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -826,8 +826,9 @@ 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')