diff options
Diffstat (limited to 'glucometerutils/support/freestyle.py')
-rw-r--r-- | glucometerutils/support/freestyle.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/glucometerutils/support/freestyle.py b/glucometerutils/support/freestyle.py index 307cf64..6c6e294 100644 --- a/glucometerutils/support/freestyle.py +++ b/glucometerutils/support/freestyle.py @@ -69,6 +69,11 @@ class FreeStyleHidDevice(object): TEXT_REPLY_CMD = 0x60 def __init__(self, device): + if not device: + raise exceptions.CommandLineError( + '--device parameter is required, should point to /dev/hidraw ' + 'for the meter') + if not os.path.exists(device): raise exceptions.ConnectionFailed( message='Path %s does not exist.' % device) |