mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-09-28 15:06:33 +03:00
transport: trace APDUs when they are sent
Right now APDUs that never return/fail are omitted from the trace output. Move the print, so it actually tells me what failed.. Change-Id: I828ea36b06da36b6bb0aa073d235d4f49cbb3161
This commit is contained in:
+3
-1
@@ -210,8 +210,10 @@ Online manual available at https://downloads.osmocom.org/docs/pysim/master/html/
|
||||
def __init__(self, cmd2_app):
|
||||
self.cmd2 = cmd2_app
|
||||
|
||||
def trace_response(self, cmd, sw, resp):
|
||||
def trace_command(self, cmd):
|
||||
self.cmd2.poutput("-> %s %s" % (cmd[:10], cmd[10:]))
|
||||
|
||||
def trace_response(self, cmd, sw, resp):
|
||||
self.cmd2.poutput("<- %s: %s" % (sw, resp))
|
||||
|
||||
def update_prompt(self):
|
||||
|
||||
@@ -45,8 +45,10 @@ class ApduTracer:
|
||||
|
||||
class StdoutApduTracer(ApduTracer):
|
||||
"""Minimalistic APDU tracer, printing commands to stdout."""
|
||||
def trace_response(self, cmd, sw, resp):
|
||||
def trace_command(self, cmd):
|
||||
log.info("-> %s %s", cmd[:10], cmd[10:])
|
||||
|
||||
def trace_response(self, cmd, sw, resp):
|
||||
log.info("<- %s: %s", sw, resp)
|
||||
|
||||
def trace_reset(self):
|
||||
|
||||
Reference in New Issue
Block a user