[X2Go-Commits] [python-x2go] 02/02: x2go/client.py: Catch some (more) x2go_exceptions.X2GoSessionRegistryException occurrences.
git-admin at x2go.org
git-admin at x2go.org
Thu Aug 19 17:08:05 CEST 2021
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository python-x2go.
commit e316516ac4ac255460ffbbd67630859ba1ba1b9d
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Thu Aug 19 17:07:13 2021 +0200
x2go/client.py: Catch some (more) x2go_exceptions.X2GoSessionRegistryException occurrences.
---
debian/changelog | 2 ++
x2go/client.py | 15 ++++++++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ed3348d..8960e57 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ python-x2go (0.6.1.4-0x2go1) UNRELEASED; urgency=medium
- x2go/utils.py: If setdpi is false, we need to enforce the default DPI
(instead of dropping it from _params). Otherwise, no DPI can be set
at all.
+ - x2go/client.py: Catch some (more)
+ x2go_exceptions.X2GoSessionRegistryException occurrences.
-- X2Go Release Manager <git-admin at x2go.org> Wed, 01 Jan 2020 20:25:50 +0100
diff --git a/x2go/client.py b/x2go/client.py
index 20e47c8..bd7458c 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -1829,7 +1829,10 @@ class X2GoClient(object):
"""
if session_name is None:
- return self.session_registry(session_uuid).is_running()
+ try:
+ return self.session_registry(session_uuid).is_running()
+ except x2go_exceptions.X2GoSessionRegistryException:
+ return None
else:
return session_name in [ s for s in self.server_running_sessions(session_uuid) ]
__is_session_running = is_session_running
@@ -1848,7 +1851,10 @@ class X2GoClient(object):
"""
if session_name is None:
- return self.session_registry(session_uuid).is_suspended()
+ try:
+ return self.session_registry(session_uuid).is_suspended()
+ except x2go_exceptions.X2GoSessionRegistryException:
+ return None
else:
return session_name in [ s for s in self.server_suspended_sessions(session_uuid) ]
__is_session_suspended = is_session_suspended
@@ -1867,7 +1873,10 @@ class X2GoClient(object):
"""
if session_name is None:
- return self.session_registry(session_uuid).has_terminated()
+ try:
+ return self.session_registry(session_uuid).has_terminated()
+ except x2go_exceptions.X2GoSessionRegistryException:
+ return None
else:
return session_name not in [ s for s in self.server_running_sessions(session_uuid) + self.server_suspended_sessions(session_uuid) ]
__has_session_terminated = has_session_terminated
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/python-x2go.git
More information about the x2go-commits
mailing list