The branch, twofactorauth has been updated via c84844dfe09359d4f113a533f89362581a0eb947 (commit) from 481acc6867d37250684a1530c24b32fa3dbd49ae (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/cleanup.py | 68 ++++++++++++++++++++++++++++++------------------------ 2 files changed, 39 insertions(+), 30 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 2c4142f..fed78c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ python-x2go (0.1.1.3-0~x2go1) UNRELEASED; urgency=low - Desktop sharing: try ''<user>@<display>.0'' additionally to ''<user>@<display>'' when trying to find a desktop for sharing. - Fix AttributeError if no graphical proxy instance has been declared yet. + - Do not allow any interruption during X2go cleanup calls. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Fri, 01 Jul 2011 14:53:48 +0200 diff --git a/x2go/cleanup.py b/x2go/cleanup.py index 8b72614..ab28fe6 100644 --- a/x2go/cleanup.py +++ b/x2go/cleanup.py @@ -62,39 +62,47 @@ def x2go_cleanup(e=None, threads=None): @type threads: C{list} """ - if threads is None: - threads = threading.enumerate() - else: - threads = threads - - # stop X2go reverse forwarding tunnels - for t in threads: - if type(t) == rforward.X2goRevFwTunnel: - t.stop_thread() - del t - - # stop X2go paramiko transports used by X2goTerminalSession objects - for t in threads: - if type(t) == paramiko.Transport: - if hasattr(t, '_x2go_session_marker'): - t.stop_thread() - del t + try: + if threads is None: + threads = threading.enumerate() + else: + threads = threads - # on Windows: stop the XServer that we evoked - if _X2GOCLIENT_OS == 'Windows': + # stop X2go reverse forwarding tunnels for t in threads: - if type(t) == xserver.X2goXServer: + if type(t) == rforward.X2goRevFwTunnel: t.stop_thread() - gevent.sleep(1) del t - # on Windows: stop the PulseAudio daemon that we evoked - if _X2GOCLIENT_OS == 'Windows': + # stop X2go paramiko transports used by X2goTerminalSession objects for t in threads: - if type(t) == pulseaudio.X2goPulseAudio: - t.stop_thread() - gevent.sleep(1) - del t - - if e is not None: - raise e + if type(t) == paramiko.Transport: + if hasattr(t, '_x2go_session_marker'): + t.stop_thread() + del t + + # on Windows: stop the XServer that we evoked + if _X2GOCLIENT_OS == 'Windows': + for t in threads: + if type(t) == xserver.X2goXServer: + t.stop_thread() + gevent.sleep(1) + del t + + # on Windows: stop the PulseAudio daemon that we evoked + if _X2GOCLIENT_OS == 'Windows': + for t in threads: + if type(t) == pulseaudio.X2goPulseAudio: + t.stop_thread() + gevent.sleep(1) + del t + + if e is not None: + raise e + + except KeyboardInterrupt: + # do not allow keyboard interrupts during Python X2go cleanup + pass + except SystemExit: + # neither do we allow SIGTERM signals during cleanup... + pass 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).