From f1fc619b2dc7d45e4986d3508f0e3bed3a9768ee Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 11 Nov 2021 12:06:21 +0100 Subject: [PATCH] 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 --- pySim/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/commands.py b/pySim/commands.py index cea330e7..674e1845 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -228,7 +228,7 @@ class SimCardCommands(object): 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):