aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Weth <git@jonathanweth.de>2020-07-31 16:00:11 +0200
committerJonathan Weth <git@jonathanweth.de>2020-07-31 16:00:11 +0200
commit8bdd82f633e2904959327cb90c39901e9499bfa9 (patch)
tree1eede1d6ef035835f8df9c1c274db224fac07dc9
parent4747c039084167143b9c567c9b4a69efef28c1f1 (diff)
downloadRWA.Support.SessionService-8bdd82f633e2904959327cb90c39901e9499bfa9.tar.gz
RWA.Support.SessionService-8bdd82f633e2904959327cb90c39901e9499bfa9.tar.bz2
RWA.Support.SessionService-8bdd82f633e2904959327cb90c39901e9499bfa9.zip
Don't log so often.
Close #11
-rwxr-xr-xservice.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/service.py b/service.py
index daa35e5..f1d1f4f 100755
--- a/service.py
+++ b/service.py
@@ -165,23 +165,25 @@ class RWAService(dbus.service.Object):
def _update_session(self, pid: int):
"""Update the status of a session."""
- logging.info(f"Update status for session #{pid} …")
try:
session = self.sessions[pid]
except KeyError:
+ logging.info(f"Update status for session #{pid} …")
logging.warning(" Session is dead.")
return
# Check if VNC process is still running
running = session.vnc_process_running
if running:
- logging.info(" Session is running.")
+ pass
elif session.status_text == "stopped" and session.pid in self.sessions:
+ logging.info(f"Update status for session #{pid} …")
logging.warning(" Session is dead.")
del self.sessions[session.pid]
else:
+ logging.info(f"Update status for session #{pid} …")
logging.warning(" VNC was stopped, so session is dead.")
session.stop()