[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.1.0.10-218-g77c8b64
X2Go dev team
git-admin at x2go.org
Tue Aug 27 13:22:20 CEST 2013
The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
via 77c8b6464aa3c845d4b8cdb0d1794c5b57d9ade0 (commit)
from 703c8897df7a2ac61213a1ad607cdaf9f0ca4292 (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:
debian/changelog | 1 +
pyhoca/wxgui/frontend.py | 57 ++++++++++++++++++++++++----------------------
2 files changed, 31 insertions(+), 27 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 0e297b8..41b455a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -111,6 +111,7 @@ pyhoca-gui (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
- When packaging Windows binary with py2exe, use VcXsrv-1.12.0.1.
- Fix missing declaration of notificationmessage_NotifierPopup.timeout.
- Make sure the log file on Windows does not grow limitlessly.
+ - Fix initialization of published applications sessions.
* Depend on Python X2Go 0.1.2.0.
* Install GNOME icons via dh_links.
* Install X2Go icons with explicit install paths.
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index e3eec79..76d30d5 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -392,36 +392,39 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
# suspend any running session that is in published applications mode (unless we are already associated with it)
session_list = self._X2goClient__list_sessions(session_uuid=session_uuid, profile_name=profile_name)
- pubapp_sessions_running = [ _sn for _sn in session_list.keys() if session_list[_sn].is_running() and session_list[_sn].is_published_applications_provider() ]
- for session_name in pubapp_sessions_running:
+ if session_list:
+ pubapp_sessions_running = [ _sn for _sn in session_list.keys() if session_list[_sn].is_running() and session_list[_sn].is_published_applications_provider() ]
+ for session_name in pubapp_sessions_running:
- self.suspend_session(session_uuid=connected_session(), session_name=session_name)
+ self.suspend_session(session_uuid=connected_session(), session_name=session_name)
- # resume first available session in published applications mode... (from PyHoca-GUI's perspective there should only
- # be one)
- if pubapp_sessions_running:
- gevent.sleep(1)
+ # resume first available session in published applications mode... (from PyHoca-GUI's perspective there should only
+ # be one)
+ if pubapp_sessions_running:
+ gevent.sleep(1)
session_list = self._X2goClient__list_sessions(session_uuid=session_uuid, profile_name=profile_name, refresh_cache=True)
- pubapp_sessions_suspended = [ _sn for _sn in session_list.keys() if session_list[_sn].is_suspended() and session_list[_sn].is_published_applications_provider() ]
-
- for session_name in pubapp_sessions_suspended:
-
- if not pubapp_session_resumed:
- # resume one single session in published applications mode immediately, if available
- pubapp_session = self._X2goClient__register_session(profile_name=profile_name,
- published_applications=True,
- cmd='PUBLISHED',
- session_type='published',
- session_name=session_name,
- published_applications_no_submenus=self.args.published_applications_no_submenus,
- return_object=True
- )
- pubapp_session_resumed = pubapp_session.resume()
- elif session_list[session_name].is_published_applications_provider() and pubapp_session_resumed:
-
- # if there are more then one published applications mode sessions (in suspended state), terminate them now...
-
- connected_session.terminate(session_name=session_name)
+
+ if session_list:
+ pubapp_sessions_suspended = [ _sn for _sn in session_list.keys() if session_list[_sn].is_suspended() and session_list[_sn].is_published_applications_provider() ]
+
+ for session_name in pubapp_sessions_suspended:
+
+ if not pubapp_session_resumed:
+ # resume one single session in published applications mode immediately, if available
+ pubapp_session = self._X2goClient__register_session(profile_name=profile_name,
+ published_applications=True,
+ cmd='PUBLISHED',
+ session_type='published',
+ session_name=session_name,
+ published_applications_no_submenus=self.args.published_applications_no_submenus,
+ return_object=True
+ )
+ pubapp_session_resumed = pubapp_session.resume()
+ elif session_list[session_name].is_published_applications_provider() and pubapp_session_resumed:
+
+ # if there are more then one published applications mode sessions (in suspended state), terminate them now...
+
+ connected_session.terminate(session_name=session_name)
if not pubapp_session_resumed:
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