diff options
author | Dorian Scholz <DorianScholz@gmx.de> | 2017-05-30 07:35:18 +0200 |
---|---|---|
committer | Dorian Scholz <DorianScholz@gmx.de> | 2017-05-30 07:35:18 +0200 |
commit | e259d1228638f9749d2bc87c0585d0e7a864a36d (patch) | |
tree | ef84fa5cba59be4b6daf63e522bc0242a60db245 /glucometer.py | |
parent | Add the Optium Neo as an untested supported device. (diff) | |
download | glucometerutils-e259d1228638f9749d2bc87c0585d0e7a864a36d.tar glucometerutils-e259d1228638f9749d2bc87c0585d0e7a864a36d.tar.gz glucometerutils-e259d1228638f9749d2bc87c0585d0e7a864a36d.tar.bz2 glucometerutils-e259d1228638f9749d2bc87c0585d0e7a864a36d.tar.lz glucometerutils-e259d1228638f9749d2bc87c0585d0e7a864a36d.tar.xz glucometerutils-e259d1228638f9749d2bc87c0585d0e7a864a36d.tar.zst glucometerutils-e259d1228638f9749d2bc87c0585d0e7a864a36d.zip |
Diffstat (limited to 'glucometer.py')
-rwxr-xr-x | glucometer.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/glucometer.py b/glucometer.py index 19a47a8..9b3e66e 100755 --- a/glucometer.py +++ b/glucometer.py @@ -13,8 +13,6 @@ import inspect import logging import sys -from dateutil import parser as date_parser - from glucometerutils import common from glucometerutils import exceptions @@ -108,7 +106,11 @@ def main(): print(device.set_datetime()) elif args.set: try: + from dateutil import parser as date_parser new_date = date_parser.parse(args.set) + except ImportError: + logging.error('could not import module "dateutil", please install it.') + return 1 except ValueError: logging.error('%s: not a valid date', args.set) return 1 |