From 2c77347d56edf36c2e8d16338c7e9e348fc44c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Wed, 2 Aug 2023 23:05:35 +0100 Subject: If present, load the actual keys from freestyle-keys package. --- freestyle_hid/_exceptions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'freestyle_hid/_exceptions.py') diff --git a/freestyle_hid/_exceptions.py b/freestyle_hid/_exceptions.py index 38a822d..2b803f8 100644 --- a/freestyle_hid/_exceptions.py +++ b/freestyle_hid/_exceptions.py @@ -16,3 +16,14 @@ class ChecksumError(Exception): class CommandError(Exception): """Errors related to the command stream.""" + + +class MissingFreeStyleKeys(Exception): + """The freestyle-hid-keys package is missing.""" + + def __init__(self): + super().__init__( + "The freestyle-hid-keys package is missing, please install it from PyPi." + " You can install freestyle-hid[encryption] to select the encryption keys" + " package as an extra dependency." + ) -- cgit v1.2.3