mirror of https://gerrit.osmocom.org/pysim
Use read_binary function of card class to read GID2 and reduce code duplication
Change-Id: I5d80fcc1446a6691b8e2a09bcec558148fa31ab2
This commit is contained in:
parent
ad10d66baf
commit
e573ccb53c
|
@ -124,7 +124,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# EF.GID2
|
# EF.GID2
|
||||||
try:
|
try:
|
||||||
(res, sw) = card.read_gid2()
|
(res, sw) = card.read_binary('GID2')
|
||||||
if sw == '9000':
|
if sw == '9000':
|
||||||
print("GID2: %s" % (res,))
|
print("GID2: %s" % (res,))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -160,13 +160,6 @@ class Card(object):
|
||||||
else:
|
else:
|
||||||
return (None, sw)
|
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
|
# Read the (full) AID for either ISIM or USIM application
|
||||||
def read_aid(self, isim = False):
|
def read_aid(self, isim = False):
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue