summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2013-08-03 10:55:58 +0200
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2013-08-03 10:55:58 +0200
commit7800d521704de17f3a0a60dc4d5cf262b8cdd5a6 (patch)
treecf44e228898f1d5177f51fcfb372eef46b8102b9
parentAdd a link to README.md to try rendering it on GitHub. (diff)
downloadglucometerutils-7800d521704de17f3a0a60dc4d5cf262b8cdd5a6.tar
glucometerutils-7800d521704de17f3a0a60dc4d5cf262b8cdd5a6.tar.gz
glucometerutils-7800d521704de17f3a0a60dc4d5cf262b8cdd5a6.tar.bz2
glucometerutils-7800d521704de17f3a0a60dc4d5cf262b8cdd5a6.tar.lz
glucometerutils-7800d521704de17f3a0a60dc4d5cf262b8cdd5a6.tar.xz
glucometerutils-7800d521704de17f3a0a60dc4d5cf262b8cdd5a6.tar.zst
glucometerutils-7800d521704de17f3a0a60dc4d5cf262b8cdd5a6.zip
-rw-r--r--glucometerutils/drivers/otultra2.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py
index 43be6d4..3182b42 100644
--- a/glucometerutils/drivers/otultra2.py
+++ b/glucometerutils/drivers/otultra2.py
@@ -235,7 +235,8 @@ class Device(object):
if not match:
raise exceptions.InvalidResponse(header)
- final_unit = unit or self._ParseGlucoseUnit(match.group(2))
+ if not unit:
+ unit = self._ParseGlucoseUnit(match.group(2))
count = int(match.group(1))
assert count == len(data)