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
This commit is contained in:
Philipp Maier 2021-11-11 12:06:21 +01:00
parent 4ab971c62e
commit f1fc619b2d
1 changed files with 1 additions and 1 deletions

View File

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