summaryrefslogtreecommitdiffstats
path: root/glucometerutils/support/hiddevice.py
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.com>2020-03-14 19:13:55 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.com>2020-03-14 19:13:55 +0100
commit9fb0f80e84f752e3b3c4ae5e1071a6edcbf56b94 (patch)
treeebb59348f88a455cdc06b87aa8da821637dc4e55 /glucometerutils/support/hiddevice.py
parentExpand line length in Emacs to match black. (diff)
downloadglucometerutils-9fb0f80e84f752e3b3c4ae5e1071a6edcbf56b94.tar
glucometerutils-9fb0f80e84f752e3b3c4ae5e1071a6edcbf56b94.tar.gz
glucometerutils-9fb0f80e84f752e3b3c4ae5e1071a6edcbf56b94.tar.bz2
glucometerutils-9fb0f80e84f752e3b3c4ae5e1071a6edcbf56b94.tar.lz
glucometerutils-9fb0f80e84f752e3b3c4ae5e1071a6edcbf56b94.tar.xz
glucometerutils-9fb0f80e84f752e3b3c4ae5e1071a6edcbf56b94.tar.zst
glucometerutils-9fb0f80e84f752e3b3c4ae5e1071a6edcbf56b94.zip
Diffstat (limited to 'glucometerutils/support/hiddevice.py')
-rw-r--r--glucometerutils/support/hiddevice.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/glucometerutils/support/hiddevice.py b/glucometerutils/support/hiddevice.py
index ad8f3a6..43461e7 100644
--- a/glucometerutils/support/hiddevice.py
+++ b/glucometerutils/support/hiddevice.py
@@ -52,9 +52,7 @@ class HidDevice:
# If the user passed a device path that does not exist, raise an
# error. This is to avoid writing to a file instead of to a device node.
if device and not os.path.exists(device):
- raise exceptions.ConnectionFailed(
- message="Path %s does not exist." % device
- )
+ raise exceptions.ConnectionFailed(message=f"Path {device} does not exist.")
# If the user passed a device, try opening it.
if device:
@@ -73,7 +71,7 @@ class HidDevice:
)
except OSError as e:
raise exceptions.ConnectionFailed(
- message="Unable to connect to meter: %s." % e
+ message=f"Unable to connect to meter: {e}."
)
def _write(self, report):