The branch, master has been updated via f046c26dbdb42ac59cdf994ba6e53791391704d7 (commit) via b60599dc6cb45440fdced438873022d43942434f (commit) from 4ccf6c292b3576265e6947d689e8fd88dda387fc (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 f046c26dbdb42ac59cdf994ba6e53791391704d7 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Jun 23 01:48:14 2011 +0200 Add X2goSession lock support. commit b60599dc6cb45440fdced438873022d43942434f Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Jun 23 01:47:02 2011 +0200 typo fix ----------------------------------------------------------------------- Summary of changes: debian/changelog | 1 + x2go/registry.py | 3 ++- x2go/session.py | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index a9c6f33..52c3ccc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ python-x2go (0.1.1.0-0~x2go1) UNRELEASED; urgency=low - Make fw tunneling more robust against failures. - Test focus put on client inter-operation. It is reliably possible now to move sessions between different clients without resume failures. + - Add X2goSession lock support. -- Mike Gabriel <mike@mimino.das-netzwerkteam.de> Wed, 22 Jun 2011 01:20:48 +0200 diff --git a/x2go/registry.py b/x2go/registry.py index c2041df..f11c045 100644 --- a/x2go/registry.py +++ b/x2go/registry.py @@ -305,7 +305,7 @@ class X2goSessionRegistry(object): _now = time.time() _time_delta = _now - self._last_available_session_registration if _time_delta < 2: - self.logger('registration interval too shoort (%s), skipping automatic session registration...' % _timedelta, loglevel=log.loglevel_DEBUG) + self.logger('registration interval too short (%s), skipping automatic session registration...' % _timedelta, loglevel=log.loglevel_DEBUG) return self._last_available_session_registration = _now @@ -317,6 +317,7 @@ class X2goSessionRegistry(object): # any of the connected sessions is valuable for accessing the profile's control # session commands, so we simply take the first that comes in... _ctrl_session = self(_connected_sessions[0]) + if session_list is None: session_list = _ctrl_session.list_sessions() diff --git a/x2go/session.py b/x2go/session.py index cdfa76f..cb101b1 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -212,6 +212,8 @@ class X2goSession(object): self._last_status = None + self.locked = False + self.printing = printing self.allow_share_local_folders = allow_share_local_folders self.share_local_folders = share_local_folders @@ -1293,6 +1295,19 @@ class X2goSession(object): raise X2goSessionException('this X2goSession object does not have any associated terminal') __share_local_folder = share_local_folder + def is_locked(self): + """\ + Query session if it is locked by some command being processed. + + @return: return C{True} is the session is locked, C{False} if not; returns None, if there is no + control session yet. + @rtype: C{bool} + + """ + if self.control_session is not None: + return self.control_session.locked or self.locked + return None + def session_cleanup(self): """\ Clean up X2go 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).