Change in pysim[master]: Use read_binary function of card class to read GID2 and reduce code d...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Wed Apr 1 08:54:53 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/17697 )

Change subject: Use read_binary function of card class to read GID2 and reduce code duplication
......................................................................

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

Change-Id: I5d80fcc1446a6691b8e2a09bcec558148fa31ab2
---
M pySim-read.py
M pySim/cards.py
2 files changed, 1 insertion(+), 8 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



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 @@
 
 	# 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 @@
 		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):
 

-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/17697
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I5d80fcc1446a6691b8e2a09bcec558148fa31ab2
Gerrit-Change-Number: 17697
Gerrit-PatchSet: 1
Gerrit-Owner: herlesupreeth <herlesupreeth at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200401/acce4c60/attachment.htm>


More information about the gerrit-log mailing list