This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to annotated tag 0.6.1.0
in repository x2goclient.

commit 20a1cc9a222004386f38a23684cfac132ce7ea5d
Author: Mike Gabriel <mike.gabr...@das-netzwerkteam.de>
Date:   Sat Dec 1 11:57:31 2018 +0100

    Catch HOOK_no_such_command and bail out if the server does not know how to 
execute the given session command.
---
 debian/changelog       | 2 ++
 pyhoca/cli/frontend.py | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index cfc2c173..0141ac62 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ pyhoca-cli (0.6.0.1-0x2go1) UNRELEASED; urgency=medium
     - pyhoca/cli/frontend.py: Be more real-time realistic and user friendly
       with notice log messages after authentication.
     - pyhoca/cli/frontend.py: rephrase auth success message slightly.
+    - Catch HOOK_no_such_command and bail out if the server does not
+      know how to execute the given session command.
   * debian/control:
     + Set Section: from "python" to "x11". More appropriate.
     + Bump versioned D on python3-x2go to (0.6.0.2-0~).
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 483c2d4d..072c915c 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -69,6 +69,14 @@ class PyHocaCLI(x2go.X2GoClient):
     def _runtime_error(self, m, exitcode=-1):
         runtime_error(m, exitcode=exitcode)
 
+    def HOOK_no_such_command(self, *args, **kwargs):
+        x2go.X2GoClient.HOOK_no_such_command(self, *args, **kwargs)
+        if len(args) == 0:
+            cmd=kwargs['cmd']
+        else:
+            cmd=args[0]
+        self._runtime_error("The remote X2Go Server does not know how to 
execute the command '{cmd}'. Aborting...".format(cmd=cmd))
+
     def list_sessions(self, s_hash):
         """\
         List up server-side available sessions for the logged in user.

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/x2goclient.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to