[X2go-Commits] python-x2go.git - master (branch) updated: 0.2.1.0-10-g36689cb

X2Go dev team git-admin at x2go.org
Tue Dec 18 12:41:31 CET 2012


The branch, master has been updated
       via  36689cb17e965b1d5437e2235aebe639abe17831 (commit)
       via  453d11e530cc18fe7d88598bad7bbb13fc1cc6f2 (commit)
      from  6efedf038a16505e6cd6c20656b5b9c688da3d6a (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 36689cb17e965b1d5437e2235aebe639abe17831
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Dec 18 12:37:29 2012 +0100

    release 0.2.1.1

commit 453d11e530cc18fe7d88598bad7bbb13fc1cc6f2
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Dec 17 21:32:27 2012 +0100

    Make connection disruptures more robust.

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

Summary of changes:
 debian/changelog                 |    5 +++--
 x2go/backends/control/_stdout.py |   12 ++++++++++++
 x2go/cache.py                    |    8 +++++---
 3 files changed, 20 insertions(+), 5 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 36e4a9a..4e01b79 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-python-x2go (0.2.1.1-0~x2go1) UNRELEASED; urgency=low
+python-x2go (0.2.1.1-0~x2go1) unstable; urgency=low
 
   * New upstream version (0.2.1.1):
     - Make sure that internal calls to _X2goClient__list_sessions are not
@@ -12,8 +12,9 @@ python-x2go (0.2.1.1-0~x2go1) UNRELEASED; urgency=low
       under the same user ID, we have to strictly differentiate between
       running/suspend sessions associated to the several connected session
       profiles.
+    - Make connection disruptures more robust.
 
- -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Thu, 13 Dec 2012 13:32:30 +0100
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Tue, 18 Dec 2012 12:36:34 +0100
 
 python-x2go (0.2.1.0-0~x2go1) unstable; urgency=low
 
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index 7e29166..fdb80d4 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -798,6 +798,9 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
                         if str(e) == 'No authentication methods available':
                             raise paramiko.AuthenticationException('Interactive password authentication required!')
                         else:
+                            self.close()
+                            if self.sshproxy_session:
+                                self.sshproxy_session.stop_thread()
                             raise(e)
 
                 # since Paramiko 1.7.7.1 there is compression available, let's use it if present...
@@ -872,9 +875,16 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
                     self.logger('Requesting SSH agent forwarding for control session of connected session profile %s' % self.profile_name, loglevel=log.loglevel_INFO)
                 else:
                     self.logger('SSH agent forwarding is not available in the Paramiko version used with this instance of Python X2Go', loglevel=log.loglevel_WARN)
+        else:
+            self.close()
+            if self.sshproxy_session:
+                self.sshproxy_session.stop_thread()
 
         self._remote_home = None
         if not self.home_exists():
+            self.close()
+            if self.sshproxy_session:
+                self.sshproxy_session.stop_thread()
             raise x2go_exceptions.X2goRemoteHomeException('remote home directory does not exist')
 
         return (self.get_transport() is not None)
@@ -979,6 +989,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
                 return True
         except x2go_exceptions.X2goControlSessionException:
             self.session_died = True
+            self.disconnect()
         return False
 
     def has_session_died(self):
@@ -1438,6 +1449,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
 
             if _count >= _maxwait:
                 self.session_died = True
+                self.disconnect()
                 raise x2go_exceptions.X2goControlSessionException('x2golistsessions command failed after we have tried 20 times')
 
             # update internal variables when list_sessions() is called
diff --git a/x2go/cache.py b/x2go/cache.py
index f0063d7..1654e08 100644
--- a/x2go/cache.py
+++ b/x2go/cache.py
@@ -152,7 +152,8 @@ class X2goListSessionsCache(object):
             self.x2go_listsessions_cache[profile_name]['mounts'] = {}
             if self.x2go_listsessions_cache[profile_name]['sessions']:
                 for session_name in self.x2go_listsessions_cache[profile_name]['sessions']:
-                    self.x2go_listsessions_cache[profile_name]['mounts'].update(control_session.list_mounts(session_name))
+                    if control_session is not None and not control_session.has_session_died():
+                        self.x2go_listsessions_cache[profile_name]['mounts'].update(control_session.list_mounts(session_name))
         except (x2go_exceptions.X2goControlSessionException, AttributeError), e:
             if profile_name in self.x2go_listsessions_cache.keys():
                 del self.x2go_listsessions_cache[profile_name]
@@ -173,7 +174,8 @@ class X2goListSessionsCache(object):
         @raise X2goControlSessionException: if the control session's C{list_desktop} method fails
         """
         try:
-            self.x2go_listsessions_cache[profile_name]['desktops'] = control_session.list_desktops()
+            if control_session is not None and not control_session.has_session_died():
+                self.x2go_listsessions_cache[profile_name]['desktops'] = control_session.list_desktops()
         except (x2go_exceptions.X2goControlSessionException, AttributeError), e:
             if profile_name in self.x2go_listsessions_cache.keys():
                 del self.x2go_listsessions_cache[profile_name]
@@ -192,7 +194,7 @@ class X2goListSessionsCache(object):
         @raise X2goControlSessionException: if the control session's C{list_sessions} method fails
         """
         try:
-            if control_session is not None:
+            if control_session is not None and not control_session.has_session_died():
                 self.x2go_listsessions_cache[profile_name]['sessions'] = control_session.list_sessions()
         except (x2go_exceptions.X2goControlSessionException, AttributeError), e:
             if profile_name in self.x2go_listsessions_cache.keys():


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