dexter has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/00/38000/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 02ca217..3a6b053 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -824,8 +824,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')
To view, visit change 38000. To unsubscribe, or for help writing mail filters, visit settings.