From 568a9043e9e27eeb9f4ac7657e85b878f853b667 Mon Sep 17 00:00:00 2001 From: Paolo Devoti Date: Mon, 22 Jul 2019 08:17:13 +0200 Subject: [PATCH] fix ord is unneded on byte values --- modem/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modem/base.py b/modem/base.py index 40b2abe..c410b9e 100644 --- a/modem/base.py +++ b/modem/base.py @@ -21,7 +21,7 @@ def calc_checksum(self, data, checksum=0): '0x3c' ''' - return (sum(map(ord, data)) + checksum) % 256 + return (sum(map(lambda x: x, data)) + checksum) % 256 def calc_crc16(self, data, crc=0): '''