[X2Go-Commits] python-x2go.git - release/0.4.0.x (branch) updated: 85f28c3e6beb2ce84844c1165ad93a0b25af989c

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


The branch, release/0.4.0.x has been updated
       via  85f28c3e6beb2ce84844c1165ad93a0b25af989c (commit)
      from  9ce76c3bb9a3bfefbe5128aee2d3e3bd9aa1e8c5 (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/control/stdout.py  |    8 ++++++--
 x2go/backends/terminal/stdout.py |   16 ++++++----------
 x2go/client.py                   |   18 ++++++++++++++++++
 3 files changed, 30 insertions(+), 12 deletions(-)

The diff of changes is:
diff --git a/x2go/backends/control/stdout.py b/x2go/backends/control/stdout.py
index a97e622..a38d55c 100644
--- a/x2go/backends/control/stdout.py
+++ b/x2go/backends/control/stdout.py
@@ -270,8 +270,12 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
         STILL UNDOCUMENTED
 
         """
-        for t in self.associated_terminals:
-            del t
+        t_names = self.associated_terminals.keys()
+        for  t_obj in self.associated_terminals.values():
+            t_obj.suspend()
+            del t_obj
+        for t_name in t_names:
+            del self.associated_terminals[t_name]
         if self.get_transport() is not None:
             self.get_transport().close()
 
diff --git a/x2go/backends/terminal/stdout.py b/x2go/backends/terminal/stdout.py
index dc427e9..367a92b 100644
--- a/x2go/backends/terminal/stdout.py
+++ b/x2go/backends/terminal/stdout.py
@@ -288,6 +288,8 @@ class X2goTerminalSessionSTDOUT(object):
         except AttributeError:
             pass
 
+        self.session_info.clear()
+
     def _mk_session_rootdir(self, d):
 
         try:
@@ -421,7 +423,7 @@ class X2goTerminalSessionSTDOUT(object):
 
         """
         if self.session_info.username not in self.control_session._x2go_remote_group('x2goprint'):
-            raise x2go_exceptions.X2goSessionException('remote user %s is not member of X2go server group x2goprint' % self.session_info.username)
+            raise x2go_exceptions.X2goPrintException('remote user %s is not member of X2go server group x2goprint' % self.session_info.username)
 
         spool_dir = os.path.join(self.session_info.local_container, 'spool')
         if not os.path.exists(spool_dir):
@@ -652,7 +654,6 @@ class X2goTerminalSessionSTDOUT(object):
         self.proxy_subprocess = self.proxy.start_proxy()
         self.guardian_thread.active_threads.append(self.proxy)
 
-        self.associated = True
         return self.ok()
 
     def resume(self):
@@ -701,18 +702,16 @@ class X2goTerminalSessionSTDOUT(object):
         @rtype: bool
 
         """
-        self.logger('suspending associated session: %s' % self.session_info, log.loglevel_DEBUG)
+        self.logger('suspending terminal session: %s' % self.session_info, log.loglevel_DEBUG)
         (stdin, stdout, stderr) = self.control_session._x2go_exec_command("x2gosuspend-session %s" % self.session_info, loglevel=log.loglevel_DEBUG)
         dummy_stdout = stdout.read()
         dummy_stderr = stderr.read()
-        self.associated = False
-        self._x2go_tidy_up()
         # TODO: check if session has really suspended
         _ret = True
 
         return _ret
 
-    def terminate(self, session_name=None):
+    def terminate(self):
         """\
         Terminate this X2go session.
 
@@ -720,13 +719,10 @@ class X2goTerminalSessionSTDOUT(object):
         @rtype: bool
 
         """
-        self.logger('terminating associated session: %s' % self.session_info, log.loglevel_INFO)
+        self.logger('terminating terminal session: %s' % self.session_info, log.loglevel_INFO)
         (stdin, stdout, stderr) = self.control_session._x2go_exec_command("x2goterminate-session %s" % self.session_info, loglevel=log.loglevel_DEBUG)
         dummy_stdout = stdout.read()
         dummy_stderr = stderr.read()
-        self.session_info.clear()
-        self.associated = False
-        self._x2go_tidy_up()
         # TODO: check if session has really suspended
         _ret = True
 
diff --git a/x2go/client.py b/x2go/client.py
index effeada..23a5338 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -826,6 +826,15 @@ class X2goClient(object):
         return self.session_registry.has_suspended_sessions
     __client_has_suspended_sessions = client_has_suspended_sessions
 
+    @property
+    def client_registered_sessions(self):
+        """\
+        STILL UNDOCUMENTED
+
+        """
+        return self.session_registry.registered_sessions
+    __client_registered_sessions = client_registered_sessions
+
     def client_registered_sessions_of_name(self, profile_name):
         """\
         STILL UNDOCUMENTED
@@ -953,6 +962,15 @@ class X2goClient(object):
     get_session_profiles = get_profiles
     """Alias for L{get_profiles()}."""
 
+
+    @property
+    def profile_names(self):
+        """\
+        STILL UNDOCUMENTED
+
+        """
+        return self.session_profiles.profile_names
+
     def get_client_settings(self):
         """\
         Returns the L{X2goClient} instance's L{X2goClientSettings} object.


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