[X2go-Commits] python-x2go.git - release/0.1.1.x (branch) updated: 0.1.1.7-11-g2eaa28d
X2go dev team
git-admin at x2go.org
Tue Sep 27 20:49:28 CEST 2011
The branch, release/0.1.1.x has been updated
via 2eaa28d9aac14d7aa40f315084013bf2346665a5 (commit)
via c19244a46d5323607653a98d186d9f370efcbbd9 (commit)
from da6002f82aca5764b23e1bd0cf6b55fc50fe0be7 (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 2eaa28d9aac14d7aa40f315084013bf2346665a5
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Tue Sep 27 20:48:38 2011 +0200
Always disconnect from X2goSession instance.
commit c19244a46d5323607653a98d186d9f370efcbbd9
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Tue Sep 27 20:47:53 2011 +0200
Catch failures on sftp_write in control session instance.
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 2 ++
x2go/backends/control/_stdout.py | 12 +++++++-----
x2go/session.py | 3 +++
3 files changed, 12 insertions(+), 5 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 3cea1fb..bdb7124 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ python-x2go (0.1.1.8-0-x2go1) UNRELEASED; urgency=low
- Unshare local folders during session cleanup.
- Remove local session cache folders after sessions have terminated.
- Fix missing import of socket module in backends/control/_stdout.py.
+ - Catch failures on sftp_write in control session instance.
+ - Always disconnect from X2goSession instance.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Sun, 25 Sep 2011 02:08:11 +0200
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index 25c2068..57df4f7 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -160,10 +160,13 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
def _x2go_sftp_write(self, remote_path, content):
self.logger('sFTP-write: opening remote file %s on host %s for writing' % (remote_path, self.get_transport().getpeername()), loglevel=log.loglevel_DEBUG)
- remote_fileobj = self.sftp_client.open(remote_path, 'w')
- self.logger('sFTP-write: writing content: %s' % content, loglevel=log.loglevel_DEBUG_SFTPXFER)
- remote_fileobj.write(content)
- remote_fileobj.close()
+ try:
+ remote_fileobj = self.sftp_client.open(remote_path, 'w')
+ self.logger('sFTP-write: writing content: %s' % content, loglevel=log.loglevel_DEBUG_SFTPXFER)
+ remote_fileobj.write(content)
+ remote_fileobj.close()
+ except SSHException:
+ self.logger('sFTP-write: opening remote file %s on host %s failed' % (remote_path, self.get_transport().getpeername()), loglevel=log.loglevel_WARN)
def _x2go_sftp_remove(self, remote_path):
@@ -495,7 +498,6 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
self.session_died = False
if not self.home_exists():
- self.disconnect()
raise x2go_exceptions.X2goRemoteHomeException('remote home directory does not exist')
return (self.get_transport() is not None)
diff --git a/x2go/session.py b/x2go/session.py
index f700c03..f8d2ace 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -773,6 +773,9 @@ class X2goSession(object):
**_params)
except X2goControlSessionException, e:
raise X2goSessionException(str(e))
+ except X2goRemoteHomeException, e:
+ self.disconnect()
+ raise e
except:
# remove credentials immediately
self.control_params['password'] = ''
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).
More information about the x2go-commits
mailing list