summaryrefslogtreecommitdiffstats
path: root/glucometerutils/exceptions.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add missing SPDX-FileCopyrightText throughout the project.Diego Elio Pettenò2020-03-271-0/+1
| | | | This is following the advice provided in https://matija.suklje.name/how-and-why-to-properly-write-copyright-statements-in-your-code
* The big typing cleanup.Diego Elio Pettenò2020-03-271-16/+19
| | | | | | | | Now that Python 3.7 is the minimum Python version, typing can be done inline, which makes it easier for mypy to know the files to check. Indeed, all the files are now typechecked, which uncovered a few minor bugs and mistakes here and there.
* Now that Python 3.6 is the minimum supported version, use f-strings.Diego Elio Pettenò2020-03-141-6/+3
| | | | | | | | | | | The f-strings formatted strings are generally simpler to write, read and debug, with a few exceptions. Keep the logging strings lazy, keep the CSV-building with %-formatting, as it makes it more readable. In fsoptium, keep `'$%s\r\n'` as a %-format, to avoid making it `f'${command}\r\n'` that would make it easy to mistake for a Shell variable.
* format code with blackBen2020-03-081-7/+10
|
* Make InvalidChecksum parameters and message harder to misunderstand.Diego Elio Pettenò2019-09-261-3/+3
|
* Introduce an explicit InvalidDateTime exception for meters with unset time.Diego Elio Pettenò2019-07-011-0/+8
| | | | | | | | At least the FreeStyle Precision Neo appears to be able to report an invalid date/time (255/255/255 255:255), probably when the RTC is lost (see issue #58). This returns a more precise output than N/A, and should suggest to confirm the date and time setting instead.
* Replace epydoc metadata with SPDX identifiers.Diego Elio Pettenò2019-02-081-5/+2
| | | | | | | | | | Most of the epydoc metadata (author, copyright, email) is duplicate in the package's setup.py or README. These copies are more likely to get out of date, and increase the amount of work to keep them in line. The license information should rather be provided with an SPDX identifier, which is more similar to what the Linux kernel and other projects, such as pyserial, do.
* Replace flameeyes.eu with flameeyes.com.Diego Elio Pettenò2019-02-081-1/+1
| | | | | | | | Due to EURid threatening to suspend my domain, make sure that the references are updated to point at the right stable domain. This includes changes to the files as well as a mailmap to update the author references in the log.
* exceptions: avoid using kwargs for message, as it's not correct.Diego Elio Pettenò2019-01-281-2/+2
| | | | Fixes the nested exception reported in Issue #50.
* Simplify exceptions hierarchy.Diego Elio Pettenò2018-12-121-14/+10
|
* Reindent all files to match the 4-spaces indentation.Diego Elio Pettenò2018-12-121-22/+22
|
* Add a ne support class for HID-based devices.Diego Elio Pettenò2017-06-041-0/+7
| | | | | I'm currently implementing a separate HID-based driver that does not use the Abbott protocol, so this makes my life easier.
* all drivers: make --device optional at the tool level.Diego Elio Pettenò2017-04-151-0/+7
| | | | | | | | 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.
* Move the InvalidChecksum exception to the base exceptions module.Diego Elio Pettenò2016-03-021-0/+7
| | | | | Most glucometers have *some* sort of checksum, so there is no reason to implement this on a per-driver basis.
* Make the ConnectionFailed exception more generic.Diego Elio Pettenò2016-02-131-2/+2
|
* Implement a basic driver for the FreeStyle Optium devices.Diego Elio Pettenò2016-02-081-0/+7
| | | | | This driver supports dumping of (glucose) readings and reading/setting the clock.
* Relicense everything under MIT license.Diego Elio Pettenò2013-08-031-1/+1
| | | | | There is no reason for me to use GPLv3 now that I'm not using the CRC32-Sick code, so I'll go with the most liberal license out there.
* Add support for checksum verification for the otultra2 driver.Diego Elio Pettenò2013-08-031-8/+5
| | | | | | | This introduced some changes in the Exception class to simplify the code, and at the same time it adds a module for multiple lifescan drivers to share code (multiple OneTouch protocols share the same checksum for instance).
* Add utf-8 encoding specification to all files.Diego Elio Pettenò2013-08-031-0/+1
|
* Initial import of the raw data.Diego Elio Pettenò2013-08-031-0/+29