summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--glucometerutils/drivers/freestyle_optium.py4
-rw-r--r--glucometerutils/drivers/otultra2.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/glucometerutils/drivers/freestyle_optium.py b/glucometerutils/drivers/freestyle_optium.py
index cbf171e..659c9c3 100644
--- a/glucometerutils/drivers/freestyle_optium.py
+++ b/glucometerutils/drivers/freestyle_optium.py
@@ -74,7 +74,7 @@ def _parse_clock(datestr):
month = _MONTH_MATCHES[match.group('month')]
year = int(match.group('year'))
- hour, minute, second = (int(part) for part in match.group('time').split(':'))
+ hour, minute, second = map(match.group('time').split(':'), int)
return datetime.datetime(year, month, day, hour, minute, second)
@@ -264,7 +264,7 @@ class Device(object):
month = _MONTH_MATCHES[match.group('month')]
year = int(match.group('year'))
- hour, minute = (int(part) for part in match.group('time').split(':'))
+ hour, minute = map(match.group('time').split(':'), int)
timestamp = datetime.datetime(year, month, day, hour, minute)
diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py
index 522d9a0..9bb52d1 100644
--- a/glucometerutils/drivers/otultra2.py
+++ b/glucometerutils/drivers/otultra2.py
@@ -115,8 +115,8 @@ def _parse_datetime(response):
raise exceptions.InvalidResponse(response)
date, time = match.groups()
- month, day, year = [int(part) for part in date.split('/')]
- hour, minute, second = [int(part) for part in time.split(':')]
+ month, day, year = map(date.split('/'), int)
+ hour, minute, second = map(time.split(':'), int)
# Yes, OneTouch2's firmware is not Y2K safe.
return datetime.datetime(2000 + year, month, day, hour, minute, second)