From 84aad729d78f53d6acbac283b3a3a9626c767754 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bulski Date: Wed, 7 Mar 2018 02:15:05 +0100 Subject: Update lifescan_binary_protocol.py lambdafied this expression --- glucometerutils/support/lifescan_binary_protocol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glucometerutils/support/lifescan_binary_protocol.py b/glucometerutils/support/lifescan_binary_protocol.py index 9bdb220..1771dcf 100644 --- a/glucometerutils/support/lifescan_binary_protocol.py +++ b/glucometerutils/support/lifescan_binary_protocol.py @@ -40,11 +40,11 @@ def LifeScanPacket(command_prefix, include_link_control): construct.Struct( construct.Const(b'\x02'), # stx 'length' / construct.Rebuild( - construct.Byte, lambda ctx: len(ctx.message) + 7), + construct.Byte, lambda this: len(this.message) + 7), 'link_control' / link_control_construct, 'command_prefix' / command_prefix_construct, 'message' / construct.Bytes( - length=lambda ctx: ctx.length - 7), + lambda this: len(this.message)), construct.Const(b'\x03'), # etx ), ), -- cgit v1.2.3