mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-28 00:08:36 +03:00
Don't try to parse result if select_file() failed
Change-Id: I25b859374e33654e58d07061926bf8529eab87f3
This commit is contained in:
@@ -109,6 +109,8 @@ class SimCardCommands(object):
|
|||||||
if not hasattr(type(ef), '__iter__'):
|
if not hasattr(type(ef), '__iter__'):
|
||||||
ef = [ef]
|
ef = [ef]
|
||||||
r = self.select_file(ef)
|
r = self.select_file(ef)
|
||||||
|
if len(r[-1]) == 0:
|
||||||
|
return (None, None)
|
||||||
if length is None:
|
if length is None:
|
||||||
length = self.__len(r) - offset
|
length = self.__len(r) - offset
|
||||||
pdu = self.cla_byte + 'b0%04x%02x' % (offset, (min(256, length) & 0xff))
|
pdu = self.cla_byte + 'b0%04x%02x' % (offset, (min(256, length) & 0xff))
|
||||||
|
|||||||
Reference in New Issue
Block a user