X2Go dev team | 20 Feb 22:43 2013

x2gobroker.git - master (branch) updated: 0.0.0.1-43-g7009b45

The branch, master has been updated
       via  7009b45598b63ddc76192f7fc87bc9a80b15e8bc (commit)
      from  0be15373a8d8833277f8dcdb7274f2e4d425721a (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 7009b45598b63ddc76192f7fc87bc9a80b15e8bc
Author: Mike Gabriel <mike.gabriel@...>
Date:   Wed Feb 20 22:46:02 2013 +0100

    fixes after testing broker agent calls

-----------------------------------------------------------------------

Summary of changes:
 x2gobroker/agent.py               |    6 +++---
 x2gobroker/brokers/base_broker.py |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

The diff of changes is:
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 3fe9feb..1192063 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
 <at>  <at>  -103,7 +103,7  <at>  <at>  def list_sessions(username, query_mode='LOCAL', remote_agent=None):
      <at> type remote_agent: C{dict}

     """
-    if query_mode == 'LOCAL':
+    if query_mode.upper() == u'LOCAL':
         return call_local_broker_agent(username, mode='listsessions')
     else:
         return call_remote_broker_agent(username, mode='listsessions', remote_agent=remote_agent)
 <at>  <at>  -124,7 +124,7  <at>  <at>  def find_busy_servers(username, query_mode='LOCAL', remote_agent=None):
      <at> type remote_agent: C{dict}

     """
-    if query_mode == 'LOCAL':
+    if query_mode.upper() == u'LOCAL':
         server_list = call_local_broker_agent(username, mode='findbusyservers')
     else:
         server_list = call_remote_broker_agent(username, mode='findbusyservers', remote_agent=remote_agent)
 <at>  <at>  -152,7 +152,7  <at>  <at>  def get_servers(username, query_mode='LOCAL', remote_agent=None):
      <at> type remote_agent: C{dict}

     """
-    if query_mode == 'LOCAL':
+    if query_mode.upper() == u'LOCAL':
         return call_local_broker_agent(username, mode='getservers')
     else:
         return call_local_broker_agent(username, mode='getservers', remote_agent=remote_agent)
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 13235cb..54d68e6 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
 <at>  <at>  -736,7 +736,7  <at>  <at>  class X2GoBroker(object):
         if len(server_list) >= 2:

             remote_agent = None
-            if agent_query_mode == 'SSH':
+            if agent_query_mode.upper() == u'SSH':
                 random.shuffle(server_list)
                 remote_agent_server = server_list[0]
                 remote_agent_port = profile[u'sshport']
 <at>  <at>  -765,7 +765,7  <at>  <at>  class X2GoBroker(object):
         # do some load balancing if more than one server is configured
         if len(server_list) >= 2 and username:

-            session_list = x2gobroker.agent.list_sessions(username=username)
+            session_list = x2gobroker.agent.list_sessions(username=username,
query_mode=agent_query_mode, remote_agent=remote_agent)
             if session_list:

                 # if resuming, always select the first session in the list, there should only be one suspended session

hooks/post-receive

Gmane