[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 798c46162caf414ffe985bcbbc7b71215867c46d

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


The branch, build-baikal has been updated
       via  798c46162caf414ffe985bcbbc7b71215867c46d (commit)
      from  1998b07f0f581166646e32e2312ac1058f4900b1 (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/client.py |   21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

The diff of changes is:
diff --git a/x2go/client.py b/x2go/client.py
index 23a5338..4f03b73 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -683,7 +683,7 @@ class X2goClient(object):
         return self.session_registry(session_uuid).is_connected()
     __is_session_connected = is_session_connected
 
-    def is_session_running(self, session_uuid):
+    def is_session_running(self, session_uuid, session_name=None):
         """\
         Test if the X2go session registered as C{session_uuid} is up 
         and running.
@@ -695,10 +695,13 @@ class X2goClient(object):
         @rtype: C{bool}
 
         """
-        return self.session_registry(session_uuid).is_running()
+        if session_name is None:
+            return self.session_registry(session_uuid).is_running()
+        else:
+            return session_name in [ s.get_session_name() in self.server_running_sessions(session_uuid) ]
     __is_session_running = is_session_running
 
-    def is_session_suspended(self, session_uuid):
+    def is_session_suspended(self, session_uuid, session_name=None):
         """\
         Test if the X2go session registered as C{session_uuid} 
         is in suspended state.
@@ -710,10 +713,13 @@ class X2goClient(object):
         @rtype: C{bool}
 
         """
-        return self.session_registry(session_uuid).is_suspended()
+        if session_name is None:
+            return self.session_registry(session_uuid).is_suspended()
+        else:
+            return session_name in [ s.get_session_name() in self.server_suspended_sessions(session_uuid) ]
     __is_session_suspended = is_session_suspended
 
-    def has_session_terminated(self, session_uuid):
+    def has_session_terminated(self, session_uuid, session_name=None):
         """\
         Test if the X2go session registered as C{session_uuid} 
         has terminated.
@@ -725,7 +731,10 @@ class X2goClient(object):
         @rtype: C{bool}
 
         """
-        return self.session_registry(session_uuid).has_terminated()
+        if session_name is None:
+            return self.session_registry(session_uuid).has_terminated()
+        else:
+            return session_name not in [ s.get_session_name() in self.server_running_sessions(session_uuid)  + self.server_suspended_sessions(session_uuid) ]
     __has_session_terminated = has_session_terminated
 
     def share_local_folder_with_session(self, session_uuid, folder_name):


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