[X2go-Commits] python-x2go.git - release/0.1.1.x (branch) updated: 0.1.1.7-1-g9ea25b8

X2go dev team git-admin at x2go.org
Sun Sep 25 02:42:11 CEST 2011


The branch, release/0.1.1.x has been updated
       via  9ea25b87eb8667eedc2a45cf27ff80d97256df62 (commit)
      from  539ca3ee9ed07ddfce6f2a6d90f876479c8f87a9 (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 9ea25b87eb8667eedc2a45cf27ff80d97256df62
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Sun Sep 25 02:41:09 2011 +0200

    Bugfix for: Test for existence of remote home directory on connect.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                 |    8 ++++++++
 x2go/backends/control/_stdout.py |    6 ++++--
 x2go/client.py                   |    1 +
 x2go/x2go_exceptions.py          |    1 +
 4 files changed, 14 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 918594b..4d4fc98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-x2go (0.1.1.8-0-x2go1) UNRELEASED; urgency=low
+
+  [ Mike Gabriel ]
+  * 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.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sun, 25 Sep 2011 02:08:11 +0200
+
 python-x2go (0.1.1.7-0-x2go1) unstable; urgency=low
 
   [ Mike Gabriel ]
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index e382493..b5313a8 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -493,7 +493,8 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
             self.session_died = False
 
         if not self.home_exists():
-            raise x2go_exceptions.X2goControlSessionException('remote home directory does not exist')
+            self.disconnect()
+            raise x2go_exceptions.X2goRemoteHomeException('remote home directory does not exist')
 
         return (self.get_transport() is not None)
 
@@ -550,7 +551,8 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
 
 
     def home_exists(self):
-        if self._x2go_exec_command('stat -tL "%s"', loglevel=log.loglevel_DEBUG):
+        (_stdin, _stdout, _stderr) = self._x2go_exec_command('stat -tL "%s"' % self._x2go_remote_home, loglevel=log.loglevel_DEBUG)
+        if _stdout.read():
             return True
         return False
 
diff --git a/x2go/client.py b/x2go/client.py
index 0d4061b..37ec3bd 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -1102,6 +1102,7 @@ class X2goClient(object):
             self.session_registry.register_available_server_sessions(profile_name=self.get_session_profile_name(session_uuid),
                                                                      newly_connected=True,
                                                                     )
+        return _success
     __connect_session = connect_session
 
     def disconnect_session(self, session_uuid):
diff --git a/x2go/x2go_exceptions.py b/x2go/x2go_exceptions.py
index c068b6c..d3a2eeb 100644
--- a/x2go/x2go_exceptions.py
+++ b/x2go/x2go_exceptions.py
@@ -45,6 +45,7 @@ class X2goClientPrintingException(_X2goException): pass
 class X2goClientSettingsException(_X2goException): pass
 class X2goSessionException(_X2goException): pass
 class X2goControlSessionException(_X2goException): pass
+class X2goRemoteHomeException(_X2goException): pass
 class X2goHostKeyException(_X2goException): pass
 class X2goSSHProxyHostKeyException(_X2goException): pass
 class X2goTerminalSessionException(_X2goException): 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).




More information about the x2go-commits mailing list