This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository python-x2go. from ea67d2f debian/changelog: Fix description of a fix. new d383eb7 X2GoControlSession.get_server_versions(): Fix another Py3 issue where we forgot decoding stdout before applying string operations. new 99d08fe x2go/client.py: Add is_x2goserver() method to X2GoClient class API. The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 3 +++ x2go/backends/control/plain.py | 5 ++++- x2go/client.py | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/python-x2go.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository python-x2go. commit d383eb79567677a5be1756ec0fd991f8d82e7a2f Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Nov 10 22:45:46 2018 +0100 X2GoControlSession.get_server_versions(): Fix another Py3 issue where we forgot decoding stdout before applying string operations. --- debian/changelog | 2 ++ x2go/backends/control/plain.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d7a72b0..ce947ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ python-x2go (0.6.0.2-0x2go1) UNRELEASED; urgency=medium * New upstream version 0.6.0.2: - Support try-resuming of rootless or published applications sessions (required for pyhoca-cli --try-resume). + - X2GoControlSession.get_server_versions(): Fix another Py3 issue where + we forgot decoding stdout before applying string operations. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Tue, 18 Sep 2018 21:17:35 +0200 diff --git a/x2go/backends/control/plain.py b/x2go/backends/control/plain.py index 8d708cb..dcc2b43 100644 --- a/x2go/backends/control/plain.py +++ b/x2go/backends/control/plain.py @@ -575,7 +575,10 @@ class X2GoControlSession(paramiko.SSHClient): if self._server_versions is None: self._server_versions = {} (stdin, stdout, stderr) = self._x2go_exec_command('which x2goversion >/dev/null && x2goversion') - _lines = stdout.read().split('\n') + if sys.version_info[0] >= 3: + _lines = stdout.read().decode().split('\n') + else: + _lines = stdout.read().split('\n') for _line in _lines: if ':' not in _line: continue comp = _line.split(':')[0].strip() -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/python-x2go.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository python-x2go. commit 99d08fe57184d93b49968cec3ec278cf9a6d1a94 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Nov 10 22:48:30 2018 +0100 x2go/client.py: Add is_x2goserver() method to X2GoClient class API. --- debian/changelog | 1 + x2go/client.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/debian/changelog b/debian/changelog index ce947ce..9ef40bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ python-x2go (0.6.0.2-0x2go1) UNRELEASED; urgency=medium (required for pyhoca-cli --try-resume). - X2GoControlSession.get_server_versions(): Fix another Py3 issue where we forgot decoding stdout before applying string operations. + - x2go/client.py: Add is_x2goserver() method to X2GoClient class API. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Tue, 18 Sep 2018 21:17:35 +0200 diff --git a/x2go/client.py b/x2go/client.py index 6c3c76a..1aa0c7d 100644 --- a/x2go/client.py +++ b/x2go/client.py @@ -2208,6 +2208,24 @@ class X2GoClient(object): return self.session_registry.control_session_of_profile_name(profile_name) __client_control_session_of_profile_name = client_control_session_of_profile_name + def is_x2goserver(self, session_uuid, force=False): + """\ + Check a remote and connected server (identified by the session_uuid hash) + if it really is an X2Go Server (i.e., if it has the X2Go Server software + installed. + + :param session_uuid: the X2Go session's UUID registry hash + :type session_uuid: ``str`` + :param force: reinforce the lookup, don't use cached information + :type force: ``bool`` + + :returns: ``True`` if the remote server has X2Go Server installed, ``False`` otherwise. + :rtype: ``bool`` + + """ + profile_name = self.session_registry(session_uuid).get_profile_name() + return ('x2goserver' in self.get_server_versions(profile_name, force=force).keys()) + def get_server_versions(self, profile_name, component=None, force=False): """\ Query the server configured in session profile <profile_name> for the list of install X2Go components -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/python-x2go.git