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
This commit is contained in:
Philipp Maier 2021-03-26 11:50:21 +01:00 committed by Harald Welte
parent 38c74f6d41
commit b63766b96b
1 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,10 @@ class PysimApp(cmd2.Cmd):
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))