The branch, statusflag has been updated via 0560f43d1fffc74435248349721c7bfc21b8a25c (commit) from 91513a529b3ce9f1aacfe88c039e78489eae710e (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 0560f43d1fffc74435248349721c7bfc21b8a25c Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jun 4 21:59:25 2013 +0200 consider hostname when evaluating the list of running/suspended sessions ----------------------------------------------------------------------- Summary of changes: x2gobroker/agent.py | 2 +- x2gobroker/brokers/base_broker.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) The diff of changes is: diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py index af179b4..0b6d94b 100644 --- a/x2gobroker/agent.py +++ b/x2gobroker/agent.py @@ -190,7 +190,7 @@ def has_sessions(username, query_mode='LOCAL', remote_agent=None): """ _session_list = list_sessions(username, query_mode=query_mode, remote_agent=remote_agent) - return (bool([ s for s in _session_list if s.split('|')[4] == 'R' ]), bool([ s for s in _session_list if s.split('|')[4] == 'S' ])) + return ([ s[3] for s in _session_list if s.split('|')[4] == 'R' ], [ s[3] for s in _session_list if s.split('|')[4] == 'S' ]) def find_busy_servers(username, query_mode='LOCAL', remote_agent=None): """\ diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py index 8ceacd7..446fb69 100644 --- a/x2gobroker/brokers/base_broker.py +++ b/x2gobroker/brokers/base_broker.py @@ -855,8 +855,8 @@ class X2GoBroker(object): agent_query_mode = ( remote_agent == u'LOCAL') and u'LOCAL' or u'SSH' if remote_agent: running_sessions, suspended_sessions = x2gobroker.agent.has_sessions(username, query_mode=agent_query_mode, remote_agent=remote_agent) - if running_sessions: profile['status'] = u'R' - if suspended_sessions: profile['status'] = u'S' + if set(profile['host']).intersection(set(running_sessions)): profile['status'] = u'R' + if set(profile['host']).intersection(set(suspended_sessions)): profile['status'] = u'S' list_of_profiles.update({profile_id: profile, }) hooks/post-receive -- x2gobroker.git (HTTP(S) Session broker for X2Go) 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 "x2gobroker.git" (HTTP(S) Session broker for X2Go).