[X2Go-Commits] python-x2go.git - brokerclient (branch) updated: 0.1.1.4-60-gee2ce40

X2Go dev team git-admin at x2go.org
Tue Jan 7 16:20:54 CET 2014


The branch, brokerclient has been updated
       via  ee2ce40e07dede7165912d0890f161780e946f2b (commit)
      from  7a7a93082f9791c56f5fc98b30562d0c4408e8be (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/backends/control/_stdout.py |   12 +++++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 81122b0..1885014 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ 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.
 
  -- 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 5e7d2a3..0a61c50 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)


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