summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2017-01-17 01:13:35 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2017-01-17 01:13:35 +0100
commitf25061b9e78d82435eb48b9024f736df9c5812ad (patch)
tree704e437997238320ad662ff2005f09d408fcb20f
parentfreestyle: raise NotImplementedError when trying to zero-log. (diff)
downloadglucometerutils-f25061b9e78d82435eb48b9024f736df9c5812ad.tar
glucometerutils-f25061b9e78d82435eb48b9024f736df9c5812ad.tar.gz
glucometerutils-f25061b9e78d82435eb48b9024f736df9c5812ad.tar.bz2
glucometerutils-f25061b9e78d82435eb48b9024f736df9c5812ad.tar.lz
glucometerutils-f25061b9e78d82435eb48b9024f736df9c5812ad.tar.xz
glucometerutils-f25061b9e78d82435eb48b9024f736df9c5812ad.tar.zst
glucometerutils-f25061b9e78d82435eb48b9024f736df9c5812ad.zip
-rw-r--r--glucometerutils/support/freestyle.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/glucometerutils/support/freestyle.py b/glucometerutils/support/freestyle.py
index db3dbee..b6dce38 100644
--- a/glucometerutils/support/freestyle.py
+++ b/glucometerutils/support/freestyle.py
@@ -110,7 +110,7 @@ class FreeStyleHidDevice(object):
message_length = usb_packet[1]
message_content = usb_packet[2:2+message_length]
- # There appears to be a stray number of 22 01 03 messages being returned
+ # There appears to be a stray number of 22 01 xx messages being returned
# by some devices after commands are sent. These do not appear to have
# meaning, so ignore them and proceed to the next.
if message_type == 0x22 and message_length == 1:
@@ -145,7 +145,7 @@ class FreeStyleHidDevice(object):
_verify_checksum(message, match.group('checksum'))
if match.group('status') != 'OK':
- raise exceptions.InvalidResponse(message)
+ raise exceptions.InvalidResponse(message or "Command failed")
return message