The branch, master has been updated via b2ba91b1c47870a8cc0ac41ec0b3921062cafcba (commit) from 8f5a27d8a245ca0f5e149c879f83cb086a5f22c5 (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 b2ba91b1c47870a8cc0ac41ec0b3921062cafcba Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sun Sep 25 21:35:06 2011 +0200 Remove local session cache folders after sessions have terminated. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 1 + x2go/backends/terminal/_stdout.py | 16 ++++++++++++++++ x2go/session.py | 5 +++++ 3 files changed, 22 insertions(+), 0 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index b7b89a9..e0e2ca4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ python-x2go (0.1.1.8-0-x2go1) UNRELEASED; urgency=low * New upstream version (0.1.1.8), bugfix release for 0.1.1.x series: - Bugfix for: Test for existence of remote home directory on connect. - Unshare local folders during session cleanup. + - Remove local session cache folders after sessions have terminated. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Sun, 25 Sep 2011 02:08:11 +0200 diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py index 4ada1a1..c48bcd2 100644 --- a/x2go/backends/terminal/_stdout.py +++ b/x2go/backends/terminal/_stdout.py @@ -35,6 +35,7 @@ import threading import signal import cStringIO import copy +import shutil # Python X2go modules import x2go.rforward as rforward @@ -350,6 +351,7 @@ class X2goTerminalSessionSTDOUT(object): except AttributeError: pass + # destroy current session information self.session_info.clear() def _mk_sessions_rootdir(self, d): @@ -363,6 +365,11 @@ class X2goTerminalSessionSTDOUT(object): else: raise OSError, e + def _rm_session_dirtree(self): + + if self.session_info: + shutil.rmtree(self.session_info.name, ignore_errors=True) + def get_session_name(self): """\ STILL UNDOCUMENTED @@ -1038,3 +1045,12 @@ class X2goTerminalSessionSTDOUT(object): if self.proxy is not None: self.proxy.__del__() + def post_terminate_cleanup(self): + """\ + STILL UNDOCUMENTED + + """ + # if we run in debug mode, we keep local session directories + if self.logger.get_loglevel() & log.loglevel_DEBUG != log.loglevel_DEBUG: + # otherwise we wipe the session files locally + self._rm_session_dirtree() diff --git a/x2go/session.py b/x2go/session.py index 7b77d0d..ddb8b3b 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -1516,7 +1516,12 @@ class X2goSession(object): # unmount shared folders self.unshare_all_local_folders() + # remove client-side session cache + if self.terminated: + self.terminal_session.post_terminate_cleanup() + # destroy terminal session if self.has_terminal_session(): self.terminal_session.__del__() + self.terminal_session = None 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).