laforge has submitted this change. (
https://gerrit.osmocom.org/c/pysim/+/37651?usp=email
)
Change subject: pySim.commands: make use of status word interpreter for CHV
......................................................................
pySim.commands: make use of status word interpreter for CHV
Related: OS#6398
Change-Id: I71efe9d6804c4845bb81f1b3b443215dad0ac301
---
M pySim/commands.py
1 file changed, 11 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/commands.py b/pySim/commands.py
index 3f659eb..43fc705 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -679,7 +679,7 @@
raise RuntimeError('Failed to %s chv_no 0x%02X with code 0x%s, %i tries
left.' %
(op_name, chv_no, b2h(pin_code).upper(), int(sw[3])))
if sw != '9000':
- raise SwMatchError(sw, '9000')
+ raise SwMatchError(sw, '9000', self._tp.sw_interpreter)
def verify_chv(self, chv_no: int, code: Hexstr) -> ResTuple:
"""Verify a given CHV (Card Holder Verification == PIN)
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/37651?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I71efe9d6804c4845bb81f1b3b443215dad0ac301
Gerrit-Change-Number: 37651
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged