summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-07-24 14:22:01 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2020-07-24 14:22:01 -0500
commita2f9b7c31beb6c32f7f03d155798c8d84930f8df (patch)
tree2ccd38ec2f452b27ad97c020ed7fdfd682314e9c
parentMinor docstring tweaks and prevent out of bounds error on socket error (diff)
downloadlirc-a2f9b7c31beb6c32f7f03d155798c8d84930f8df.zip
Add LircResponse in seperate file w/o success
-rw-r--r--lirc/lirc_response.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/lirc/lirc_response.py b/lirc/lirc_response.py
new file mode 100644
index 0000000..5fdfa1e
--- /dev/null
+++ b/lirc/lirc_response.py
@@ -0,0 +1,17 @@
+from typing import List
+
+
+class LircResponse:
+ """
+ A response from the LIRC server.
+
+ Stores the command that had been sent
+ and the parsed reply packet data.
+ """
+
+ def __init__(self, command: str, data: List[str]) -> None:
+ self.command = command
+ self.data = data
+
+ def __repr__(self) -> str:
+ return f"LircResponse(command={self.command}, data={self.data})"