diff options
| -rw-r--r-- | CHANGELOG.rst | 5 | ||||
| -rw-r--r-- | lirc/client.py | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 17b138b..0977d0d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,6 +10,11 @@ adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_. Unreleased ------------------ +**Changed** + +- ``lirc.Client`` raises a ``TypeError`` instead of a ``ValueError`` now + if a ``connection`` is passed in that is not an instance of ``LircdConnection``. + **Removed** - ``socket`` property from ``LircdConnection``. diff --git a/lirc/client.py b/lirc/client.py index 0a1b7b1..0e3fa80 100644 --- a/lirc/client.py +++ b/lirc/client.py @@ -18,14 +18,14 @@ class Client: depending on the operating system if one is not provided. Raises: - ValueError: If connection is not an instance of LircdConnection. + TypeError: If connection is not an instance of LircdConnection. LircdConnectionError: If the socket cannot connect to the address. """ if not connection: connection = LircdConnection() if not isinstance(connection, LircdConnection): - raise ValueError("`connection` must be an instance of `LircdConnection`") + raise TypeError("`connection` must be an instance of `LircdConnection`") # Used for start_repeat and stop_repeat self.__last_send_start_remote = None |