From 07cf25f67a0e77d0a8a93304efc38d36cae2dcd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Thu, 26 Sep 2019 18:47:25 +0100 Subject: Make InvalidChecksum parameters and message harder to misunderstand. --- glucometerutils/exceptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glucometerutils/exceptions.py b/glucometerutils/exceptions.py index 1cc8cfd..53aa980 100644 --- a/glucometerutils/exceptions.py +++ b/glucometerutils/exceptions.py @@ -34,10 +34,10 @@ class InvalidResponse(Error): class InvalidChecksum(InvalidResponse): - def __init__(self, expected, received): + def __init__(self, wire, calculated): super(InvalidChecksum, self).__init__( - 'Response checksum not matching: %08x expected, %08x received' % - (expected, received)) + 'Response checksum not matching: %08x (wire) != %08x (calculated)' % + (wire, calculated)) class InvalidGlucoseUnit(Error): -- cgit v1.2.3