This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/25550 )
Change subject: pySim-shell: verify_adm: turn error messages into exceptions
......................................................................
pySim-shell: verify_adm: turn error messages into exceptions
When verify_adm is used with scripts, especially bulk provisioning, then
an exception is far more visible and allows us to spot problems with ADM
verification quicker.
Change-Id: I4162b43754efd061b6b9058b7ff8e1fc985e3538
Related: SYS#5617
---
M pySim-shell.py
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/pySim-shell.py b/pySim-shell.py
index 06e14f6..6699c6f 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -310,13 +310,12 @@
if pin_adm:
self._cmd.poutput("found ADM-PIN '%s' for ICCID '%s'" % (result, self._cmd.iccid))
else:
- self._cmd.poutput("cannot find ADM-PIN for ICCID '%s'" % (self._cmd.iccid))
- return
+ raise ValueError("cannot find ADM-PIN for ICCID '%s'" % (self._cmd.iccid))
if pin_adm:
self._cmd.card.verify_adm(h2b(pin_adm))
else:
- self._cmd.poutput("error: cannot authenticate, no adm-pin!")
+ raise ValueError("error: cannot authenticate, no adm-pin!")
@with_default_category('ISO7816 Commands')
class Iso7816Commands(CommandSet):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/25550
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4162b43754efd061b6b9058b7ff8e1fc985e3538
Gerrit-Change-Number: 25550
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211001/7ad669bd/attachment.htm>