summaryrefslogtreecommitdiffstats
path: root/glucometer.py
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2013-12-14 11:33:20 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2013-12-14 11:33:20 +0100
commitb008a54b711bc7913447588bc38a0e7a59847bd5 (patch)
tree7d84982a8e1d130b1f1877f2a1a31339f210903a /glucometer.py
parentUpdate documentation for the dump format and options. (diff)
parentAdd confirmation prompt to zero log argument (diff)
downloadglucometerutils-b008a54b711bc7913447588bc38a0e7a59847bd5.tar
glucometerutils-b008a54b711bc7913447588bc38a0e7a59847bd5.tar.gz
glucometerutils-b008a54b711bc7913447588bc38a0e7a59847bd5.tar.bz2
glucometerutils-b008a54b711bc7913447588bc38a0e7a59847bd5.tar.lz
glucometerutils-b008a54b711bc7913447588bc38a0e7a59847bd5.tar.xz
glucometerutils-b008a54b711bc7913447588bc38a0e7a59847bd5.tar.zst
glucometerutils-b008a54b711bc7913447588bc38a0e7a59847bd5.zip
Diffstat (limited to 'glucometer.py')
-rwxr-xr-xglucometer.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/glucometer.py b/glucometer.py
index 155cd93..1131042 100755
--- a/glucometer.py
+++ b/glucometer.py
@@ -82,8 +82,13 @@ def main():
else:
print(device.get_datetime())
elif args.action == 'zero':
- device.zero_log()
- print('Device data log zeroed.')
+ confirm = input('Delete the device data log? (y/N) ')
+ if confirm.lower() in ['y', 'ye', 'yes']:
+ device.zero_log()
+ print('\nDevice data log zeroed.')
+ else:
+ print('\nDevice data log not zeroed.')
+ return 1
else:
return 1
except exceptions.Error as err: