[X2go-Commits] python-x2go.git - build-main (branch) updated: 0.2.0.7

X2Go dev team git-admin at x2go.org
Thu Jul 12 21:28:10 CEST 2012


The branch, build-main has been updated
       via  1b376af2f94fca115ef3f8239394416940731620 (commit)
       via  8e5e79a0cca5e63ee05b90d1c6d985bcb6306b31 (commit)
       via  bc957c408401c7583cb07618c0fc9aee762de3ec (commit)
       via  4d9aad32b35c89acda9c1a6980d4de6d24eb5f02 (commit)
       via  1a965b5147e4bb59fe764c4130f2157195a3dae7 (commit)
       via  3c94299f2518a10e1514508f591eb3799ea7e809 (commit)
      from  7fc00a22089017c94f5b91437921c9a2aa6eca34 (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                 |   13 ++++++++++++-
 x2go/__init__.py                 |    2 +-
 x2go/backends/control/_stdout.py |   32 ++++++++++++++++++++++----------
 3 files changed, 35 insertions(+), 12 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 5fc854d..9a6a1d2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+python-x2go (0.2.0.7-0~x2go1) unstable; urgency=low
+
+  * New upstream version (0.2.0.7):
+    - Refresh server feature list on re-connecting (log-off, log-on).
+    - Fix property method X2goControlSession._x2go_remote_home on broken
+      connections.
+    - Make sure SSH proxy sessions get torn down on control session disconnect
+      no matter what happens to the control session itself.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Thu, 12 Jul 2012 21:27:24 +0200
+
 python-x2go (0.2.0.6-0~x2go1) unstable; urgency=low
 
   * New upstream version (0.2.0.6)
@@ -13,7 +24,7 @@ python-x2go (0.2.0.6-0~x2go1) unstable; urgency=low
 
 python-x2go (0.2.0.5-0~x2go1) unstable; urgency=low
 
-  * Bugfix release (0.2.0.4):
+  * Bugfix release (0.2.0.5):
     - Fix for building Python X2Go in pbuilder environment. Catch
       Xlib.error.DisplayConnectionError and ignore it. Now the real fix!!!
 
diff --git a/x2go/__init__.py b/x2go/__init__.py
index 14021c4..9b73a72 100644
--- a/x2go/__init__.py
+++ b/x2go/__init__.py
@@ -178,7 +178,7 @@ Contact
 """
 
 __NAME__    = 'python-x2go'
-__VERSION__ = '0.2.0.6'
+__VERSION__ = '0.2.0.7'
 
 from gevent import monkey
 monkey.patch_all()
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index 05f355c..6dff16a 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -438,14 +438,19 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
         else:
             return self._server_features
 
-    def query_server_features(self):
+    def query_server_features(self, force=False):
         """\
         Do a query for the server-side list of X2Go features.
 
+        @param force: do not use the cached feature list, really ask the server (again)
+        @type force: C{bool}
+
         @return: list of X2Go feature names
         @rtype: C{list}
 
         """
+        if force:
+            self._server_features = None
         return self._x2go_server_features
     get_server_features = query_server_features
 
@@ -457,8 +462,10 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
         """
         if self._remote_home is None:
             (stdin, stdout, stderr) = self._x2go_exec_command('echo $HOME')
-            self._remote_home = stdout.read().split()[0]
-            self.logger('remote user\' home directory: %s' % self._remote_home, loglevel=log.loglevel_DEBUG)
+            stdout_r = stdout.read()
+            if stdout_r:
+                self._remote_home = stdout_r.split()[0]
+                self.logger('remote user\' home directory: %s' % self._remote_home, loglevel=log.loglevel_DEBUG)
             return self._remote_home
         else:
             return self._remote_home
@@ -816,7 +823,9 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
 
         if self.get_transport():
             self.session_died = False
+            self.query_server_features(force=True)
 
+        self._remote_home = None
         if not self.home_exists():
             raise x2go_exceptions.X2goRemoteHomeException('remote home directory does not exist')
 
@@ -869,21 +878,24 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
         # in any case, release out internal transport lock
         self._transport_lock.release()
 
+        retval = False
         try:
             if self.get_transport() is not None:
-                still_active = self.get_transport().is_active()
+                retval = self.get_transport().is_active()
                 try:
                     self.close()
                 except IOError:
                     pass
-                if self.sshproxy_session is not None:
-                    self.sshproxy_session.stop_thread()
-                return still_active
-            return False
         except AttributeError:
             # if the Paramiko _transport object has not yet been initialized, ignore it
             # but state that this method call did not close the SSH client, but was already closed
-            return False
+            pass
+
+        # take down sshproxy_session no matter what happened to the control session itself
+        if self.sshproxy_session is not None:
+            self.sshproxy_session.stop_thread()
+
+        return retval
 
     def home_exists(self):
         """\
@@ -959,7 +971,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
         elif lang is None:
             lang = 'en'
 
-        if 'X2GO_PUBLISHED_APPLICATIONS' in self._x2go_server_features:
+        if 'X2GO_PUBLISHED_APPLICATIONS' in self.get_server_features():
             if self._published_applications_menu is {} or \
                not self._published_applications_menu.has_key(lang) or \
                raw or very_raw or refresh or \


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