From e573ccb53cf475518294539ceb114a11a3535bcc Mon Sep 17 00:00:00 2001 From: Supreeth Herle Date: Wed, 1 Apr 2020 09:21:20 +0200 Subject: [PATCH] Use read_binary function of card class to read GID2 and reduce code duplication Change-Id: I5d80fcc1446a6691b8e2a09bcec558148fa31ab2 --- pySim-read.py | 2 +- pySim/cards.py | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/pySim-read.py b/pySim-read.py index cd824985..f167bce6 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 c702608c..d3b6262e 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):