Skip to content

Commit

Permalink
Use read_binary function of card class to read GID2 and reduce code d…
Browse files Browse the repository at this point in the history
…uplication

Change-Id: I5d80fcc1446a6691b8e2a09bcec558148fa31ab2
  • Loading branch information
herlesupreeth committed Apr 1, 2020
1 parent ad10d66 commit e573ccb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion pySim-read.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def parse_options():

# EF.GID2
try:
(res, sw) = card.read_gid2()
(res, sw) = card.read_binary('GID2')
if sw == '9000':
print("GID2: %s" % (res,))
else:
Expand Down
7 changes: 0 additions & 7 deletions pySim/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@ def read_gid1(self):
else:
return (None, sw)

def read_gid2(self):
(res, sw) = self._scc.read_binary(EF['GID2'])
if sw == '9000':
return (res, sw)
else:
return (None, sw)

# Read the (full) AID for either ISIM or USIM application
def read_aid(self, isim = False):

Expand Down

0 comments on commit e573ccb

Please sign in to comment.