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
This commit is contained in:
@@ -94,7 +94,8 @@ class CardHandlerAuto:
|
||||
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...")
|
||||
|
||||
Reference in New Issue
Block a user