From 032cd0cf3b58dcbb80d066c5409ea15c2af258ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sat, 15 Apr 2017 15:08:33 +0100 Subject: all drivers: make --device optional at the tool level. This requires the drivers to validate their device, but also means they can provide a more explicit error message for the user as to what should be passed. This is a first step to help solving Issue 9. --- glucometer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'glucometer.py') diff --git a/glucometer.py b/glucometer.py index be8fb02..63ea8fc 100755 --- a/glucometer.py +++ b/glucometer.py @@ -25,8 +25,9 @@ def main(): '--driver', action='store', required=True, help='Select the driver to use for connecting to the glucometer.') parser.add_argument( - '--device', action='store', required=True, - help='Select the path to the glucometer device.') + '--device', action='store', required=False, + help=('Select the path to the glucometer device. Some devices require this ' + 'argument, others will try autodetection.')) parser.add_argument( '--vlog', action='store', required=False, type=int, -- cgit v1.2.3