aboutsummaryrefslogtreecommitdiffstats
path: root/extras/Kuksa_Instance.py
diff options
context:
space:
mode:
Diffstat (limited to 'extras/Kuksa_Instance.py')
-rw-r--r--extras/Kuksa_Instance.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/extras/Kuksa_Instance.py b/extras/Kuksa_Instance.py
index cda539e..6add5af 100644
--- a/extras/Kuksa_Instance.py
+++ b/extras/Kuksa_Instance.py
@@ -17,7 +17,6 @@
from typing import Optional
import kuksa_client as kuksa
import threading
-import time
class KuksaClientSingleton:
@@ -73,6 +72,7 @@ class KuksaClientSingleton:
raise Exception("This class is a singleton!")
self.client = None
+ self.kuksa_config = None
KuksaClientSingleton._instance = self
@@ -89,9 +89,10 @@ class KuksaClientSingleton:
"""
if self.client:
self.client.stop()
-
- self.client = kuksa.KuksaClientThread(config)
- self.client.authorize(token)
+ self.kuksa_config = config
+ self.token = token
+ self.client = kuksa.KuksaClientThread(self.kuksa_config)
+ self.client.authorize(self.token)
self.client.start()
def get_client(self):
@@ -114,6 +115,15 @@ class KuksaClientSingleton:
dict: The configuration for KuksaClientThread.
"""
return self.kuksa_config
+
+ def get_token(self):
+ """
+ Returns the path to the token file.
+
+ Returns:
+ str: The path to the token file.
+ """
+ return self.token
def status(self):
"""