The branch, master has been updated via e10d0abda660724b07489087d3ac9be2072d870c (commit) from 0aa87b1102e51ae9295aa5ffa8f6165c7d478556 (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 e10d0abda660724b07489087d3ac9be2072d870c Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Sep 19 15:27:46 2011 +0200 Differentiate between spool folders and data folders when unsharing all folders, return exitcode from X2goTerminalSessionSTDOUT.unshare_* methods. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 3 +++ x2go/backends/terminal/_stdout.py | 4 ++++ x2go/session.py | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 00584b4..1bf49a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ python-x2go (0.1.1.7-0-x2go1) UNRELEASED; urgency=low [ Mike Gabriel ] * New upstream version (0.1.1.6), bugfix release for 0.1.1.x series: - Add support for x2goumount-session calls. + - Differentiate between spool folders and data folders when unsharing + all folders, return exitcode from X2goTerminalSessionSTDOUT.unshare_* + methods. [ Dick Kniep ] * Fix for upstream version 0.1.1.6: diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py index ab06e8c..18ea716 100644 --- a/x2go/backends/terminal/_stdout.py +++ b/x2go/backends/terminal/_stdout.py @@ -700,8 +700,10 @@ class X2goTerminalSessionSTDOUT(object): (stdin, stdout, stderr) = self.control_session._x2go_exec_command(cmd_line) if not stderr.read(): self.logger('x2goumount-session (all mounts) for session %s has been successful' % self.session_info, log.loglevel_NOTICE) + return True else: self.logger('x2goumount-session (all mounts) for session %s failed' % self.session_info, log.loglevel_ERROR) + return False def unshare_local_folder(self, local_path): """\ @@ -722,8 +724,10 @@ class X2goTerminalSessionSTDOUT(object): (stdin, stdout, stderr) = self.control_session._x2go_exec_command(cmd_line) if not stderr.read(): self.logger('x2goumount-session (%s) for session %s has been successful' % (local_path, self.session_info, ), log.loglevel_NOTICE) + return True else: self.logger('x2goumount-session (%s) for session %s failed' % (local_path, self.session_info, ), log.loglevel_ERROR) + return False def color_depth(self): """\ diff --git a/x2go/session.py b/x2go/session.py index a50ef2d..a84df03 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -1418,10 +1418,14 @@ class X2goSession(object): raise X2goSessionException('this X2goSession object does not have any associated terminal') __share_local_folder = share_local_folder - def unshare_all_local_folders(self): + def unshare_all_local_folders(self, force_all=False): """\ Unshare all local folders mounted within this X2go session. + @param force_all: Really unmount _all_ shared folders, including the print spool folder and + the MIME box spool dir (not recommended). + @type force_all: C{bool} + @return: returns C{True} if all local folders could be successfully unmounted inside this X2go session @rtype: C{bool} @@ -1429,8 +1433,15 @@ class X2goSession(object): """ if self.has_terminal_session(): if self.allow_share_local_folders: - self.shared_folders = [] - return self.terminal_session.unshare_all_local_folders() + if force_all: + self.shared_folders = [] + return self.terminal_session.unshare_all_local_folders() + else: + retval = 0 + for _shared_folder in self.shared_folders: + retval = retval | self.terminal_session.unshare_local_folder(_shared_folder) + self.shared_folders = [] + return retval else: self.logger('local folder sharing is disabled for this session profile', loglevel=log.loglevel_WARN) else: 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).