Fix WriteFileBase for new logging/transmission API

This commit is contained in:
Henryk Plötz 2019-07-10 15:48:01 +02:00
parent 24538d496a
commit 9a0e9c7d64
2 changed files with 5 additions and 2 deletions

View file

@ -497,8 +497,11 @@ class WriteFileBase(CommandWithPassword):
if isinstance(response, RequestFile):
pkt = self.get_answer_(response)
if pkt is not None:
# FIXME There should be an API for this (basically currently a copy of "send_received()")
tm.history += [(False, pkt), ]
tm.transport.send(pkt, no_wait=True)
from ecrterm.transmission._transmission import logger
logger.debug("> %r", pkt)
tm.transport.send(pkt.serialize(), no_wait=True)
return True, False
return super()._handle_super_response(response, tm)

View file

@ -3,7 +3,7 @@
"""
Example script to demonstrate a payment process.
"""
from ecrterm.ecr import ECR, ecr_log
from ecrterm.ecr import ECR
from ecrterm.packets.types import ConfigByte