[X2Go-Commits] python-x2go.git - brokerclient (branch) updated: 0.1.0.3-17-g49301f6

X2Go dev team git-admin at x2go.org
Tue Jan 7 16:20:41 CET 2014


The branch, brokerclient has been updated
       via  49301f618fa80662ce7b1ababc36f7c1e1d5abf3 (commit)
      from  a93a3515718f8308feff5a704bfded92df932e1f (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/cache.py |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

The diff of changes is:
diff --git a/x2go/cache.py b/x2go/cache.py
index 7bd8b88..7a7fb1d 100644
--- a/x2go/cache.py
+++ b/x2go/cache.py
@@ -112,12 +112,14 @@ class X2goListSessionsCache(object):
         @type profile_name: C{str}
 
         """
+        self.last_listsessions_cache = copy.deepcopy(self.x2go_listsessions_cache)
+        control_session = self.client_instance.client_control_session_of_profile_name(profile_name)
         if not self.x2go_listsessions_cache.has_key(profile_name):
             self.x2go_listsessions_cache[profile_name] = {}
-        self._update_sessions(profile_name)
-        self._update_desktops(profile_name)
+        self._update_sessions(profile_name, control_session)
+        self._update_desktops(profile_name, control_session)
 
-    def _update_desktops(self, profile_name):
+    def _update_desktops(self, profile_name, control_session):
         """\
         Update session lists of L{X2goListSessionsCache} for session profile C{profile_name}.
 
@@ -125,8 +127,6 @@ class X2goListSessionsCache(object):
         @type profile_name: C{str}
 
         """
-        self.last_listsessions_cache = copy.deepcopy(self.x2go_listsessions_cache)
-        control_session = self.client_instance.client_control_session_of_profile_name(profile_name)
         try:
             self.x2go_listsessions_cache[profile_name]['desktops'] = control_session.list_desktops()
         except x2go_exceptions.X2goControlSessionException, e:
@@ -136,7 +136,7 @@ class X2goListSessionsCache(object):
                 pass
             raise e
 
-    def _update_sessions(self, profile_name):
+    def _update_sessions(self, profile_name, control_session):
         """\
         Update desktop list of L{X2goListSessionsCache} for session profile C{profile_name}.
 
@@ -144,8 +144,6 @@ class X2goListSessionsCache(object):
         @type profile_name: C{str}
 
         """
-        self.last_listsessions_cache = copy.deepcopy(self.x2go_listsessions_cache)
-        control_session = self.client_instance.client_control_session_of_profile_name(profile_name)
         try:
             self.x2go_listsessions_cache[profile_name]['sessions'] = control_session.list_sessions()
         except x2go_exceptions.X2goControlSessionException, e:


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