[X2Go-Commits] [python-x2go] 04/08: Capture X2GoControlSessionException occurrences during client-side folder sharing initializaation while starting/resuming a session.
git-admin at x2go.org
git-admin at x2go.org
Mon Oct 20 12:43:09 CEST 2014
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch build-main
in repository python-x2go.
commit 0874534fb3416764ced96912d1eab84bbf050c25
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Mon Oct 20 09:55:24 2014 +0200
Capture X2GoControlSessionException occurrences during client-side folder sharing initializaation while starting/resuming a session.
---
debian/changelog | 2 ++
x2go/session.py | 17 +++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index c2a079f..2069d39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -121,6 +121,8 @@ python-x2go (0.5.0.0-0x2go1) UNRELEASED; urgency=low
session broker.
- Only convert the value of the export session profile option if not
already a Python dictionary.
+ - Capture X2GoControlSessionException occurrences during client-side folder
+ sharing initializaation while starting/resuming a session.
* debian/control:
+ Add dependencies: python-requests, python-simplejson.
+ Add R (python-x2go): sshfs.
diff --git a/x2go/session.py b/x2go/session.py
index 6733cdb..22760e4 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -1966,6 +1966,11 @@ class X2GoSession(object):
self.logger('%s' % str(e), loglevel=log.loglevel_WARN)
self.HOOK_printing_not_available()
self._SUPPORTED_PRINTING = False
+ except x2go_exceptions.X2GoControlSessionException, e:
+ self.logger('%s' % str(e), loglevel=log.loglevel_ERROR)
+ self.HOOK_on_control_session_death()
+ self._X2GoSession__disconnect()
+ return False
self._progress_status = 70
progress_event.set()
@@ -1978,6 +1983,11 @@ class X2GoSession(object):
self.logger('%s' % str(e), loglevel=log.loglevel_WARN)
self.HOOK_mimebox_not_available()
self._SUPPORTED_MIMEBOX = False
+ except x2go_exceptions.X2GoControlSessionException, e:
+ self.logger('%s' % str(e), loglevel=log.loglevel_ERROR)
+ self.HOOK_on_control_session_death()
+ self._X2GoSession__disconnect()
+ return False
self._progress_status = 80
progress_event.set()
@@ -2672,6 +2682,13 @@ class X2GoSession(object):
except x2go_exceptions.X2GoUserException, e:
retval = False
self.logger('%s' % str(e), loglevel=log.loglevel_WARN)
+ except x2go_exceptions.X2GoControlSessionException, e:
+ retval = False
+ self.logger('%s' % str(e), loglevel=log.loglevel_ERROR)
+ self.HOOK_on_control_session_death()
+ self._X2GoSession__disconnect()
+ break
+
if update_exported_folders:
self._update_restore_exported_folders()
self.client_instance.set_profile_config(self.profile_name, 'export', self._restore_exported_folders)
--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/python-x2go.git
More information about the x2go-commits
mailing list