summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArkadiusz Bulski <arek.bulski@gmail.com>2018-03-07 02:15:05 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-03-17 14:41:40 +0100
commit84aad729d78f53d6acbac283b3a3a9626c767754 (patch)
tree49b95a536fc64018b6dba7ded07a7dbe68a68c77
parentUpdate sdcodefree.py (diff)
downloadglucometerutils-84aad729d78f53d6acbac283b3a3a9626c767754.tar
glucometerutils-84aad729d78f53d6acbac283b3a3a9626c767754.tar.gz
glucometerutils-84aad729d78f53d6acbac283b3a3a9626c767754.tar.bz2
glucometerutils-84aad729d78f53d6acbac283b3a3a9626c767754.tar.lz
glucometerutils-84aad729d78f53d6acbac283b3a3a9626c767754.tar.xz
glucometerutils-84aad729d78f53d6acbac283b3a3a9626c767754.tar.zst
glucometerutils-84aad729d78f53d6acbac283b3a3a9626c767754.zip
-rw-r--r--glucometerutils/support/lifescan_binary_protocol.py4
1 files 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
),
),