Change in pysim[master]: card_handler: make reader (sl) operations optional.

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/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Oct 1 08:42:46 UTC 2021


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

Change subject: card_handler: make reader (sl) operations optional.
......................................................................

card_handler: make reader (sl) operations optional.

The constructor gets an sl object on initalization. The card handler
will then carry out the reader operation wait_for_card().

In cases where an mechanically automated card reader is used it may
be useful to go without those operations and let the caller carry out
the appropriate reader operations. So Lets make the sl object
optional for the CardHandlerAuto class. If it is not present, simply
do not carry out the pre programmed reader operation.

Change-Id: I0f793aec51751b7c7b87d55b66326cce9970274e
Related: SYS#5617
---
M pySim/card_handler.py
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/pySim/card_handler.py b/pySim/card_handler.py
index ef1b071..385c55e 100644
--- a/pySim/card_handler.py
+++ b/pySim/card_handler.py
@@ -94,7 +94,8 @@
 	def get(self, first = False):
 		print("Ready for Programming: Transporting card into the reader-bay...")
 		self.__exec_cmd(self.cmds['get'])
-		self.sl.connect()
+		if self.sl:
+			self.sl.connect()
 
 	def error(self):
 		print("Programming failed: Transporting card to the error-bin...")

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I0f793aec51751b7c7b87d55b66326cce9970274e
Gerrit-Change-Number: 25548
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211001/fc71a071/attachment.htm>


More information about the gerrit-log mailing list