summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lirc/__init__.py8
-rw-r--r--lirc/exceptions.py14
2 files changed, 18 insertions, 4 deletions
diff --git a/lirc/__init__.py b/lirc/__init__.py
index fe8e829..6b2338d 100644
--- a/lirc/__init__.py
+++ b/lirc/__init__.py
@@ -1,11 +1,12 @@
-from .exceptions import (
+from lirc.exceptions import (
InvalidReplyPacketFormatError,
+ LircCommandFailureError,
LircError,
LircSocketError,
LircSocketTimeoutError,
)
-from .lirc import Lirc
-from .response import LircResponse
+from lirc.lirc import Lirc
+from lirc.lirc_response import LircResponse
__version__ = "0.1.0"
@@ -16,4 +17,5 @@ __all__ = [
"LircSocketError",
"LircSocketTimeoutError",
"InvalidReplyPacketFormatError",
+ "LircCommandFailureError",
]
diff --git a/lirc/exceptions.py b/lirc/exceptions.py
index 063ca27..314cf17 100644
--- a/lirc/exceptions.py
+++ b/lirc/exceptions.py
@@ -1,5 +1,10 @@
class LircError(Exception):
- """A generic error that comes from this package."""
+ """
+ A generic error that comes from this package.
+
+ All errors are subclasses of this error so you
+ could catch all lirc errors by catching this one.
+ """
class InvalidReplyPacketFormatError(LircError):
@@ -16,3 +21,10 @@ class LircSocketTimeoutError(LircSocketError):
This can happen when recv does not find any data for
a given amount of time.
"""
+
+
+class LircCommandFailureError(LircError):
+ """
+ For when we send a command to the LIRC server
+ and that command fails to send, for whatever reason.
+ """