Change in pysim[master]: pySim-shell: be more specific when finding no ADM-PIN

laforge gerrit-no-reply at lists.osmocom.org
Fri Apr 2 14:34:01 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/23540 )

Change subject: pySim-shell: be more specific when finding no ADM-PIN
......................................................................

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
---
M pySim-shell.py
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



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))

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23540
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If8f88b43f283fbe459be1b30db35d984022840ac
Gerrit-Change-Number: 23540
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210402/f89a89ba/attachment.htm>


More information about the gerrit-log mailing list