Change in pysim[master]: commands: remove superfluous getter/setter for cla_byte property

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
Sun May 23 12:35:30 UTC 2021


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

Change subject: commands: remove superfluous getter/setter for cla_byte property
......................................................................

commands: remove superfluous getter/setter for cla_byte property

There's little point in having a getter+setter for a property if
all it does is assigning a value to an attribute of self.  That
works without any property methods

Change-Id: Id214cc83a29e8aa88f4e1413e07b419285c1b7ff
---
M pySim/commands.py
1 file changed, 1 insertion(+), 8 deletions(-)

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



diff --git a/pySim/commands.py b/pySim/commands.py
index 800c2dd..689cbea 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -29,7 +29,7 @@
 class SimCardCommands(object):
 	def __init__(self, transport):
 		self._tp = transport
-		self._cla_byte = "a0"
+		self.cla_byte = "a0"
 		self.sel_ctrl = "0000"
 
 	# Extract a single FCP item from TLV
@@ -89,13 +89,6 @@
 		"""Return the ATR of the currently inserted card."""
 		return self._tp.get_atr()
 
-	@property
-	def cla_byte(self):
-		return self._cla_byte
-	@cla_byte.setter
-	def cla_byte(self, value):
-		self._cla_byte = value
-
 	def try_select_path(self, dir_list):
 		""" Try to select a specified path given as list of hex-string FIDs"""
 		rv = []

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id214cc83a29e8aa88f4e1413e07b419285c1b7ff
Gerrit-Change-Number: 24344
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
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/20210523/0a4cd558/attachment.htm>


More information about the gerrit-log mailing list