[X2Go-Commits] [python-x2go] 08/09: X2GoServerSessionList: Provide proper accessor method for getting the complete list of sessions.
git-admin at x2go.org
git-admin at x2go.org
Fri Jul 19 19:42:45 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository python-x2go.
commit 3af74501f0e314be35ca0801af40a2e573e5db3f
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Fri Jul 19 19:35:09 2019 +0200
X2GoServerSessionList: Provide proper accessor method for getting the complete list of sessions.
---
debian/changelog | 2 ++
x2go/backends/control/plain.py | 3 ++-
x2go/backends/info/plain.py | 10 ++++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index 09e0eaf..2f7b04a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ python-x2go (0.6.0.3-0x2go1) UNRELEASED; urgency=medium
- X2GoTerminalSession: Fully delegate the session type handling
and remembering to the session's X2GoSessionInfo object.
- Add X2Go KDrive graphical rendering backend support.
+ - X2GoServerSessionList: Provide proper accessor method for getting
+ the complete list of sessions.
-- X2Go Release Manager <git-admin at x2go.org> Sat, 01 Dec 2018 02:16:45 +0100
diff --git a/x2go/backends/control/plain.py b/x2go/backends/control/plain.py
index 00a8839..24ccb0d 100644
--- a/x2go/backends/control/plain.py
+++ b/x2go/backends/control/plain.py
@@ -1771,7 +1771,8 @@ class X2GoControlSession(paramiko.SSHClient):
_stdout = stdout.read()
if sys.version_info[0] >= 3:
_stdout = _stdout.decode()
- _listsessions = self._list_backend(_stdout, info_backend=self._info_backend).sessions
+ _l = self._list_backend(_stdout, info_backend=self._info_backend)
+ _listsessions = _l.get_sessions()
_success = True
except KeyError:
gevent.sleep(1)
diff --git a/x2go/backends/info/plain.py b/x2go/backends/info/plain.py
index 9d9e270..c31c069 100644
--- a/x2go/backends/info/plain.py
+++ b/x2go/backends/info/plain.py
@@ -454,6 +454,16 @@ class X2GoServerSessionList(object):
def __call__(self):
return self.sessions
+ def get_sessions(self):
+ """\
+ Get the complete sessions property.
+
+ :return: get this instance's dictionary of sessions
+ :rtype: ``dict``
+
+ """
+ return self.sessions
+
def set_sessions(self, sessions):
"""\
Set the sessions property directly by parsing a complete data structure.
--
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