aboutsummaryrefslogtreecommitdiff
path: root/session.py
diff options
context:
space:
mode:
Diffstat (limited to 'session.py')
-rw-r--r--session.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/session.py b/session.py
index af71c6a..71650d8 100644
--- a/session.py
+++ b/session.py
@@ -6,6 +6,7 @@ import signal
import string
import subprocess
import threading
+from typing import Dict, Union
import psutil
import requests
@@ -65,7 +66,7 @@ class Session:
return self.ws_port
@property
- def _api_headers(self) -> dict:
+ def _api_headers(self) -> Dict[str, str]:
return {"Authorization": f"Token {self.api_token}"}
def _generate_password(self):
@@ -232,7 +233,7 @@ class Session:
del self
@property
- def vnc_process_running(self):
+ def vnc_process_running(self) -> bool:
"""Check if the VNC process is still running."""
if self.mockup_session:
filename = f"/tmp/rwa/{str(self.ws_port) + str(self.vnc_port) + str(self.ws_pid) + str(self.vnc_pid)}.lock"
@@ -246,9 +247,9 @@ class Session:
return False
@property
- def client_meta(self):
+ def client_meta(self) -> Dict[str, Union[str, int]]:
return {"id": self.pid, "url": self.web_url, "pin": self.pin}
@property
- def status(self):
+ def status(self) -> Dict[str, Union[str, int]]:
return {"id": self.pid, "status": self.status_text}