diff options
-rw-r--r-- | pySim/commands.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pySim/commands.py b/pySim/commands.py index 913f394..3d17903 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -109,6 +109,8 @@ class SimCardCommands(object): if not hasattr(type(ef), '__iter__'): ef = [ef] r = self.select_file(ef) + if len(r[-1]) == 0: + return (None, None) if length is None: length = self.__len(r) - offset pdu = self.cla_byte + 'b0%04x%02x' % (offset, (min(256, length) & 0xff)) |