From 27ba5833587cb1d9c554e6eebe897261337f7c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Wed, 11 Dec 2013 19:00:24 +0000 Subject: otultra2: expose the meal and comments as separate field in the CSV. Idea by Jim Sifferle, implemented in a slightly different way as I noticed I forgot to quote it properly. --- glucometerutils/drivers/otultra2.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py index 500ce17..4539cc2 100644 --- a/glucometerutils/drivers/otultra2.py +++ b/glucometerutils/drivers/otultra2.py @@ -282,11 +282,7 @@ class Device(object): date = self._parse_datetime(line_data['datetime']) meal_str = self._MEAL_CODES[line_data['meal']] comment_str = self._COMMENT_CODES[line_data['comment']] - - if meal_str and comment_str: - comment = '%s & %s' % (meal_str, comment_str) - else: - comment = meal_str or comment_str + comment = '"%s","%s"' % (meal_str, comment_str) # OneTouch2 always returns the data in mg/dL even if the # glucometer is set to mmol/L. We need to convert it to the -- cgit v1.2.3