diff --git a/mqterm/terminal.py b/mqterm/terminal.py index 46b2302..27ea07c 100644 --- a/mqterm/terminal.py +++ b/mqterm/terminal.py @@ -66,7 +66,6 @@ async def disconnect(self): async def handle_msg(self, topic, msg, properties={}): """Process a single MQTT message and apply to the appropriate job.""" - topic = topic.decode("utf-8") if not topic.startswith(self.in_topic): self.logger.debug(f"Terminal received message on {topic}; ignoring") return diff --git a/package.json b/package.json index 601bef4..1cfef20 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ ["mqterm/terminal.py", "github:solanus-systems/mqterm/mqterm/terminal.py"] ], "deps": [ - ["github:solanus-systems/amqc", "v0.3.0"], + ["github:solanus-systems/amqc", "v0.3.2"], ["logging", "latest"] ], "version": "0.2.1" diff --git a/tests/e2e/e2e_file_ops.py b/tests/e2e/e2e_file_ops.py index d2b84b8..70d9bf8 100644 --- a/tests/e2e/e2e_file_ops.py +++ b/tests/e2e/e2e_file_ops.py @@ -42,14 +42,6 @@ term = MqttTerminal(device_client, topic_prefix="/test") -# def create_props(seq: int, client_id: str) -> dict: -# """Create MQTTv5 properties with a seq number and client ID.""" -# return { -# CORRELATION_DATA: client_id.encode("utf-8"), -# USER_PROPERTY: {"seq": str(seq)}, -# } - - async def send_file(buffer: BytesIO): """Send a file to the terminal.""" # Send the first message that will create the job @@ -154,5 +146,11 @@ async def main(): if __name__ == "__main__": - asyncio.run(main()) + try: + asyncio.run(main()) + finally: + try: + os.unlink("test.txt") + except OSError: + pass print("\033[1m\tOK\033[0m")