diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2013-12-14 11:33:20 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2013-12-14 11:33:20 +0100 |
commit | b008a54b711bc7913447588bc38a0e7a59847bd5 (patch) | |
tree | 7d84982a8e1d130b1f1877f2a1a31339f210903a /glucometer.py | |
parent | Update documentation for the dump format and options. (diff) | |
parent | Add confirmation prompt to zero log argument (diff) | |
download | glucometerutils-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-x | glucometer.py | 9 |
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: |