[X2Go-Commits] [python-x2go] 07/08: X2GoSessionRegistry: Don't report about sessions that have a not yet fully assigned session name / profile name / profile id.

git-admin at x2go.org git-admin at x2go.org
Mon Oct 20 12:43:09 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch build-main
in repository python-x2go.

commit 1ad9c402bdb14afaa4d601551c11d576594e4311
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Oct 20 12:39:31 2014 +0200

    X2GoSessionRegistry: Don't report about sessions that have a not yet fully assigned session name / profile name / profile id.
---
 debian/changelog |    2 ++
 x2go/registry.py |    6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2069d39..a36193f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -123,6 +123,8 @@ python-x2go (0.5.0.0-0x2go1) UNRELEASED; urgency=low
       already a Python dictionary.
     - Capture X2GoControlSessionException occurrences during client-side folder
       sharing initializaation while starting/resuming a session.
+    - X2GoSessionRegistry: Don't report about sessions that have a not yet
+      fully assigned session name / profile name / profile id.
   * debian/control:
     + Add dependencies: python-requests, python-simplejson.
     + Add R (python-x2go): sshfs.
diff --git a/x2go/registry.py b/x2go/registry.py
index 2b181cd..bb9e788 100644
--- a/x2go/registry.py
+++ b/x2go/registry.py
@@ -660,19 +660,19 @@ class X2GoSessionRegistry(object):
         if return_profile_names:
             profile_names = []
             for this_session in sessions:
-                if this_session.profile_name not in profile_names:
+                if this_session.profile_name and this_session.profile_name not in profile_names:
                     profile_names.append(this_session.profile_name)
             return profile_names
         elif return_profile_ids:
             profile_ids = []
             for this_session in sessions:
-                if this_session.profile_id not in profile_ids:
+                if this_session.profile_id and this_session.profile_id not in profile_ids:
                     profile_ids.append(this_session.profile_id)
             return profile_ids
         elif return_session_names:
             session_names = []
             for this_session in sessions:
-                if this_session.session_name not in session_names:
+                if this_session.session_name and this_session.session_name not in session_names:
                     session_names.append(this_session.session_name)
             return session_names
         elif return_objects:

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/python-x2go.git


More information about the x2go-commits mailing list