diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2014-01-29 22:35:39 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2014-01-29 23:39:25 +0100 |
commit | 89dc59ed3858ad28c4f67c4cd7cf9c5712deea0a (patch) | |
tree | f8ff0374e37cec8ab99dcc2c02cdaee498b5b11d /glucometer.py | |
parent | Merge pull request #1 from jimsiff/master (diff) | |
download | glucometerutils-89dc59ed3858ad28c4f67c4cd7cf9c5712deea0a.tar glucometerutils-89dc59ed3858ad28c4f67c4cd7cf9c5712deea0a.tar.gz glucometerutils-89dc59ed3858ad28c4f67c4cd7cf9c5712deea0a.tar.bz2 glucometerutils-89dc59ed3858ad28c4f67c4cd7cf9c5712deea0a.tar.lz glucometerutils-89dc59ed3858ad28c4f67c4cd7cf9c5712deea0a.tar.xz glucometerutils-89dc59ed3858ad28c4f67c4cd7cf9c5712deea0a.tar.zst glucometerutils-89dc59ed3858ad28c4f67c4cd7cf9c5712deea0a.zip |
Diffstat (limited to 'glucometer.py')
-rwxr-xr-x | glucometer.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/glucometer.py b/glucometer.py index 1131042..e22ff23 100755 --- a/glucometer.py +++ b/glucometer.py @@ -53,6 +53,8 @@ def main(): driver = importlib.import_module('glucometerutils.drivers.' + args.driver) device = driver.Device(args.device) + device.connect() + try: if args.action == 'info': print(device.get_information_string()) @@ -95,5 +97,7 @@ def main(): print('Error while executing \'%s\': %s' % (args.action, str(err))) return 1 + device.disconnect() + if __name__ == "__main__": main() |