def _real_send(self, apdu): result = Card._real_send(self, apdu) self.last_sw = result.sw self.sw_changed = True return result
def __init__(self, reader): Card.__init__(self, reader) self.last_sw = None self.sw_changed = False
def check_sw(self, sw, purpose = None): if purpose is not Card.PURPOSE_SM_OK: return Card.check_sw(self, sw, purpose) else: return sw not in ("\x69\x87", "\x69\x88")