Change in pysim[master]: commands: use send_apdu_checksw() in method read_record

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Nov 22 15:45:16 UTC 2021


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

Change subject: commands: use send_apdu_checksw() in method read_record
......................................................................

commands: use send_apdu_checksw() in method read_record

At the moment the non checking send_apdu() method is used when records
are read. Lets use read_record_checksw so that we get an exception in
case there is a problem to read the specified record.

Change-Id: I9fc411e1b12e8d9fd89b9964209808c0706011bd
---
M pySim/commands.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/pySim/commands.py b/pySim/commands.py
index cea330e..674e184 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -228,7 +228,7 @@
 		r = self.select_path(ef)
 		rec_length = self.__record_len(r)
 		pdu = self.cla_byte + 'b2%02x04%02x' % (rec_no, rec_length)
-		return self._tp.send_apdu(pdu)
+		return self._tp.send_apdu_checksw(pdu)
 
 	def update_record(self, ef, rec_no:int, data:str, force_len:bool=False, verify:bool=False,
 					  conserve:bool=False):

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9fc411e1b12e8d9fd89b9964209808c0706011bd
Gerrit-Change-Number: 26206
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
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/20211122/216818b1/attachment.htm>


More information about the gerrit-log mailing list