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

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


The branch, twofactorauth has been updated
       via  301f531414426b31db6b2196502f7c1310bb7eb4 (commit)
      from  fe53e1d162fc80671321f9904ecc47f2f59b8071 (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 +
 x2go/cache.py    |    6 ++++++
 2 files changed, 7 insertions(+)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index f927ece..2365db9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -119,6 +119,7 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
     - Make sure path names in X2goPrintActions and X2goMIMEboxActions get
       transformed to OS-specific path names.
     - Not using gevent to spawn MIME box default applications.
+    - Protect session cache from deletion while being processed.
   * Depend on python-xlib.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sat, 28 Sep 2012 01:44:21 +0100
diff --git a/x2go/cache.py b/x2go/cache.py
index 77cbff2..a67b347 100644
--- a/x2go/cache.py
+++ b/x2go/cache.py
@@ -25,6 +25,7 @@ __NAME__ = 'x2gocache-pylib'
 
 # modules
 import copy
+import gevent
 
 # Python X2Go modules
 import log
@@ -62,6 +63,7 @@ class X2goListSessionsCache(object):
         """
         self.x2go_listsessions_cache = {}
         self.last_listsessions_cache = {}
+        self.protected = False
 
         if logger is None:
             self.logger = log.X2goLogger(loglevel=loglevel)
@@ -79,6 +81,8 @@ class X2goListSessionsCache(object):
         @type profile_name: C{str}
 
         """
+        while self.protected:
+            gevent.sleep()
         try: del self.x2go_listsessions_cache[profile_name]
         except KeyError: pass
 
@@ -122,6 +126,7 @@ class X2goListSessionsCache(object):
         @type update_mounts: C{bool}
 
         """
+        self.protected = True
         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):
@@ -132,6 +137,7 @@ class X2goListSessionsCache(object):
             self._update_desktops(profile_name, control_session)
         if update_mounts:
             self._update_mounts(profile_name, control_session)
+        self.protected = False
 
     def _update_mounts(self, profile_name, control_session):
         """\


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