pySim-trace: mark card reset in the trace
The trace log currently does not contain any information about card resets. This makes the trace difficult to follow. Let's use the CardReset object to display the ATR in the trace. Related: OS#6094 Change-Id: Ia550a8bd2f45d2ad622cb2ac2a2905397db76bce
This commit is contained in:
@@ -448,4 +448,11 @@ class ApduDecoder(ApduHandler):
|
||||
|
||||
|
||||
class CardReset:
|
||||
pass
|
||||
def __init__(self, atr: bytes):
|
||||
self.atr = atr
|
||||
|
||||
def __str__(self):
|
||||
if (self.atr):
|
||||
return '%s(%s)' % (type(self).__name__, b2h(self.atr))
|
||||
else:
|
||||
return '%s' % (type(self).__name__)
|
||||
|
||||
Reference in New Issue
Block a user