pySim-shell: be more specific when finding no ADM-PIN
When no ADM pin is found in the external data source, then print an
error message that tells the user that this is the case.
Change-Id: If8f88b43f283fbe459be1b30db35d984022840ac
Related: OS#4963
diff --git a/pySim-shell.py b/pySim-shell.py
index 9468444..68896cb 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -98,7 +98,10 @@
result = card_data_get_field('ADM1', key='ICCID', value=self.iccid)
pin_adm = sanitize_pin_adm(result)
if pin_adm:
- self.poutput("found adm-pin '%s' for ICCID '%s'" % (result, self.iccid))
+ self.poutput("found ADM-PIN '%s' for ICCID '%s'" % (result, self.iccid))
+ else:
+ self.poutput("cannot find ADM-PIN for ICCID '%s'" % (self._cmd.iccid))
+ return
if pin_adm:
self.card.verify_adm(h2b(pin_adm))