[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.1.1.4-165-g215aa30

X2Go dev team git-admin at x2go.org
Wed Jan 8 15:30:56 CET 2014


The branch, build-baikal has been updated
       via  215aa3056595c7592d1393e9a463530bf2316de4 (commit)
      from  521d91dfd683e3221ba0d37d24c5419f4dfb4852 (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:
 x2go/backends/info/_stdout.py |    3 +++
 x2go/backends/proxy/base.py   |    9 +++++++--
 x2go/session.py               |   22 ++++++++++++----------
 3 files changed, 22 insertions(+), 12 deletions(-)

The diff of changes is:
diff --git a/x2go/backends/info/_stdout.py b/x2go/backends/info/_stdout.py
index 2e7a8e2..76e1163 100644
--- a/x2go/backends/info/_stdout.py
+++ b/x2go/backends/info/_stdout.py
@@ -173,6 +173,9 @@ class X2goServerSessionInfoSTDOUT(object):
     def is_protected(self):
         return self.protected
 
+    def get_status(self):
+        return self.status
+
     def clear(self):
         """\
         Clear all properties of a L{X2goServerSessionInfo} object.
diff --git a/x2go/backends/proxy/base.py b/x2go/backends/proxy/base.py
index 39cc45a..ea60879 100644
--- a/x2go/backends/proxy/base.py
+++ b/x2go/backends/proxy/base.py
@@ -28,11 +28,13 @@ import gevent
 import os
 import copy
 import threading
+import socket
 
 # Python X2Go modules
 import x2go.forward as forward
 import x2go.log as log
 import x2go.utils as utils
+import x2go.x2go_exceptions as x2go_exceptions
 
 from x2go.defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS
 if _X2GOCLIENT_OS in ("Windows"):
@@ -173,8 +175,11 @@ class X2goProxyBASE(threading.Thread):
                 pass
 
         local_graphics_port = self.session_info.graphics_port
-        if self.ssh_transport.getpeername() in ('::1', '127.0.0.1', 'localhost', 'localhost.localdomain'):
-            local_graphics_port += 10000
+        try:
+            if self.ssh_transport.getpeername() in ('::1', '127.0.0.1', 'localhost', 'localhost.localdomain'):
+                local_graphics_port += 10000
+        except socket.error:
+            raise x2go_exceptions.X2goControlSessionException('The control session has died unexpectedly.')
         local_graphics_port = utils.detect_unused_port(bind_address='', preferred_port=local_graphics_port)
 
         self.fw_tunnel = forward.start_forward_tunnel(local_port=local_graphics_port, 
diff --git a/x2go/session.py b/x2go/session.py
index 8ec10f0..5450016 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -1267,7 +1267,7 @@ class X2goSession(object):
         @rtype: C{bool}
 
         """
-        if self.is_running() and self.has_terminal_session():
+        if self.has_terminal_session() and self.is_running() :
             return self.terminal_session.is_published_applications_provider()
         return False
 
@@ -1464,7 +1464,7 @@ class X2goSession(object):
                 self.terminated = False
                 self.faulty = False
 
-                self.terminal_session.session_info_unprotect()
+                self.has_terminal_session() and self.terminal_session.session_info_unprotect()
                 return True
 
             else:
@@ -1574,15 +1574,16 @@ class X2goSession(object):
         if self.is_alive():
             if self.has_terminal_session():
 
+                self.running = False
+                self.suspended = True
+                self.terminated = False
+                self.faulty = False
+
                 # unmount shared folders
                 self.unshare_all_local_folders(force_all=True)
 
                 if self.terminal_session.suspend():
 
-                    self.running = False
-                    self.suspended = True
-                    self.terminated = False
-                    self.faults = False
                     self.session_cleanup()
                     del self.terminal_session
                     self.terminal_session = None
@@ -1618,14 +1619,15 @@ class X2goSession(object):
         if self.is_alive():
             if self.has_terminal_session():
 
+                self.running = False
+                self.suspended = False
+                self.terminated = True
+                self.faulty = False
+
                 # unmount shared folders
                 self.unshare_all_local_folders(force_all=True)
 
                 if self.terminal_session.terminate():
-                    self.running = False
-                    self.suspended = False
-                    self.terminated = True
-                    self.faulty = False
                     self.session_cleanup()
                     del self.terminal_session
                     self.terminal_session = 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