From ac19ea73f4ea1d674bdd50026e34a2b7b24d7758 Mon Sep 17 00:00:00 2001
From: Philipp Hock <philipphock@gmail.com>
Date: Sun, 3 Dec 2023 16:24:50 +0100
Subject: [PATCH] some fixes

---
 AsyncLoop.py     | 2 +-
 Service.py       | 4 ++--
 requirements.txt | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/AsyncLoop.py b/AsyncLoop.py
index dfb46b1..b9e2e49 100644
--- a/AsyncLoop.py
+++ b/AsyncLoop.py
@@ -73,7 +73,7 @@ class AsyncLoop:
     def call_in_main_thread(self, callback: Callable[[],None]):
         self._loop.call_soon_threadsafe(callback)
 
-    def attach_coroutine(self, coroutine: asyncio.coroutine) -> asyncio.Task:
+    def attach_coroutine(self, coroutine) -> asyncio.Task:
         """ attaches a coroutine to the event loop """
         return self._loop.create_task(coroutine)
 
diff --git a/Service.py b/Service.py
index 3238ac2..724b513 100644
--- a/Service.py
+++ b/Service.py
@@ -86,8 +86,8 @@ class Service:
             
             # Set up MQTT message and error callbacks
             self.mqtt_client.on_message += lambda msg: self._msg(msg)
-            self.mqtt_client.on_error += lambda err: self._on_err(err)
-            self.mqtt_client.on_connect += lambda: print(f"{self._service_topic} connected")
+            #self.mqtt_client.on_error += lambda err: self._on_err(err)
+            #self.mqtt_client.on_connect += lambda: print(f"{self._service_topic} connected")
             self.mqtt_client.on_disconnect += lambda: print(f"{self._service_topic} disconnected")
             
             
diff --git a/requirements.txt b/requirements.txt
index 1e6d835..1bdf122 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1,3 @@
 events==0.5
 paho_mqtt==1.6.1
+asyncio
\ No newline at end of file
-- 
GitLab