From b63766b96b52e2948dc0abc145f47f76cb781b83 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 26 Mar 2021 11:50:21 +0100 Subject: [PATCH] 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 --- pySim-shell.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pySim-shell.py b/pySim-shell.py index 9468444a..68896cb2 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -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))