[X2Go-Commits] python-x2go.git - twofactorauth (branch) updated: 0.1.1.4-6-g3c50a9d

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:56:59 CEST 2013


The branch, twofactorauth has been updated
       via  3c50a9d2584b10c573fd3762ceb527b03f8df20a (commit)
      from  4f2a4126df79a1abb0fc111f51e747a59189835e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 x2go/client.py  |    7 +++++++
 x2go/session.py |   13 ++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

The diff of changes is:
diff --git a/x2go/client.py b/x2go/client.py
index dfdb564..e589f5a 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -328,6 +328,13 @@ class X2goClient(object):
         self.auto_update_listdesktops_cache = auto_update_listdesktops_cache
 
     # user hooks for detecting/notifying what happened during application runtime
+    def HOOK_session_startup_failed(self, profile_name='UNKNOWN'):
+        """\
+        HOOK method: called if the startup of a session failed.
+
+        """
+        self.logger('HOOK_session_startup_failed: session startup for session profile ,,%s'' failed.' % profile_name, loglevel=log.loglevel_WARN)
+
     def HOOK_no_known_xserver_found(self):
         """\
         HOOK method: called if the Python X2go module could not find any usable XServer
diff --git a/x2go/session.py b/x2go/session.py
index d28eec8..8265409 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -273,6 +273,16 @@ class X2goSession(object):
         self.init_control_session()
         self.terminal_session = None
 
+    def HOOK_session_startup_failed(self):
+        """\
+        HOOK method: called if the startup of a session failed.
+
+        """
+        if self.client_instance:
+            self.client_instance.HOOK_session_startup_failed(profile_name=self.profile_name)
+        else:
+            self.logger('HOOK_session_startup_failed: session startup for session profile ,,%s'' failed.' % self.profile_name, loglevel=log.loglevel_WARN)
+
     def HOOK_rforward_request_denied(self, server_port=0):
         """\
         HOOK method: called if a reverse port forwarding request has been denied.
@@ -1005,7 +1015,8 @@ class X2goSession(object):
                 try:
                     self.session_name = self.terminal_session.session_info.name
                 except AttributeError:
-                    raise X2goSessionException('start of new X2go session failed')
+                    self.HOOK_session_startup_failed()
+                    return False
 
             if self.has_terminal_session() and not self.faulty:
 


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list