Use read_binary function of card class to read GID2 and reduce code duplication

Change-Id: I5d80fcc1446a6691b8e2a09bcec558148fa31ab2
This commit is contained in:
Supreeth Herle 2020-04-01 09:21:20 +02:00
parent ad10d66baf
commit e573ccb53c
2 changed files with 1 additions and 8 deletions

View File

@ -124,7 +124,7 @@ if __name__ == '__main__':
# EF.GID2
try:
(res, sw) = card.read_gid2()
(res, sw) = card.read_binary('GID2')
if sw == '9000':
print("GID2: %s" % (res,))
else:

View File

@ -160,13 +160,6 @@ class Card(object):
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):