[X2go-Commits] pyhoca-gui.git - master (branch) updated: 0.1.0.3-1-g22754ec

X2go dev team git-admin at x2go.org
Thu Jun 23 13:20:52 CEST 2011


The branch, master has been updated
       via  22754ec680075cc4584bd52e681f079cba7fa923 (commit)
      from  58942df85e7133cbf39e359a2efc821d7be17ae3 (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 -----------------------------------------------------------------
commit 22754ec680075cc4584bd52e681f079cba7fa923
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jun 23 13:20:21 2011 +0200

    Tolerate fast session disconnects coming from the GUI.

-----------------------------------------------------------------------

Summary of changes:
 pyhoca/wxgui/frontend.py |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 deletions(-)

The diff of changes is:
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 7fa0d22..c2eb8f5 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -317,16 +317,20 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
 
     def _post_authenticate(self, evt, session_uuid):
 
-        _resumed = False
-        _dummy = self.list_sessions(session_uuid, refresh_cache=True)
-        if self.resume_newest_on_connect:
-            _resumed = self._resume_newest_on_connect(evt, session_uuid)
-        elif self.resume_oldest_on_connect:
-            _resumed = self._resume_oldest_on_connect(evt, session_uuid)
-        elif self.resume_all_on_connect:
-            _resumed = self._resume_all_on_connect(evt, session_uuid)
-        if not _resumed and self.start_on_connect:
-            self._start_on_connect(evt, session_uuid)
+        try:
+            _resumed = False
+            _dummy = self.list_sessions(session_uuid, refresh_cache=True)
+            if self.resume_newest_on_connect:
+                _resumed = self._resume_newest_on_connect(evt, session_uuid)
+            elif self.resume_oldest_on_connect:
+                _resumed = self._resume_oldest_on_connect(evt, session_uuid)
+            elif self.resume_all_on_connect:
+                _resumed = self._resume_all_on_connect(evt, session_uuid)
+            if not _resumed and self.start_on_connect:
+                self._start_on_connect(evt, session_uuid)
+        except x2go.X2goSessionRegistryException:
+            # there might have been a disconnect event inbetween...
+            pass
 
     def _do_authenticate(self, evt, session_uuid):
         connect_failed = False


hooks/post-receive
-- 
pyhoca-gui.git (Python X2go Client (wxPython GUI))

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 "pyhoca-gui.git" (Python X2go Client (wxPython GUI)).




More information about the x2go-commits mailing list