mirror of https://gerrit.osmocom.org/pysim
Don't try to parse result if select_file() failed
Change-Id: I25b859374e33654e58d07061926bf8529eab87f3
This commit is contained in:
parent
89cfded971
commit
5491c48e71
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue