aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSupreeth Herle <herlesupreeth@gmail.com>2020-04-01 09:21:20 +0200
committerSupreeth Herle <herlesupreeth@gmail.com>2020-04-01 09:21:20 +0200
commite573ccb53cf475518294539ceb114a11a3535bcc (patch)
treebe812c271a9c05f030259bd4e6e5acb5ff2a61a6
parentad10d66baf141a52c9080a5f236ccc9b059ed630 (diff)
Use read_binary function of card class to read GID2 and reduce code duplication
-rwxr-xr-xpySim-read.py2
-rw-r--r--pySim/cards.py7
2 files changed, 1 insertions, 8 deletions
diff --git a/pySim-read.py b/pySim-read.py
index cd82498..f167bce 100755
--- a/pySim-read.py
+++ b/pySim-read.py
@@ -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:
diff --git a/pySim/cards.py b/pySim/cards.py
index c702608..d3b6262 100644
--- a/pySim/cards.py
+++ b/pySim/cards.py
@@ -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):