[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.0.5-29-gfd53c4a

X2Go dev team git-admin at x2go.org
Sun May 19 13:04:55 CEST 2013


The branch, build-main has been updated
       via  fd53c4a42a79daf8dd3dc209dea8a475599beed6 (commit)
      from  f23bc42116e94fc7893668f247363d753cc9fd77 (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:
 x2gobroker/agent.py               |    1 -
 x2gobroker/brokers/base_broker.py |    9 ++++++---
 x2gobroker/web/plain.py           |    1 -
 3 files changed, 6 insertions(+), 5 deletions(-)

The diff of changes is:
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 1b19170..ad2a989 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -101,7 +101,6 @@ def call_remote_broker_agent(username, mode, cmdline_args=[], remote_agent=None)
         if ssh_transport.is_authenticated():
             cmd = ' '.join(cmd_line)
             cmd = 'sh -c \"{cmd}\"'.format(cmd=cmd)
-            print cmd
             (stdin, stdout, stderr) = client.exec_command(cmd)
             result = stdout.read().split('\n')
         client.close()
diff --git a/x2gobroker/brokers/base_broker.py b/x2gobroker/brokers/base_broker.py
index 8426bd1..57856d3 100644
--- a/x2gobroker/brokers/base_broker.py
+++ b/x2gobroker/brokers/base_broker.py
@@ -776,6 +776,10 @@ class X2GoBroker(object):
         list_of_profiles = {}
         for profile_id in self.get_profile_ids():
             profile = self.get_profile(profile_id)
+
+            if self.use_session_autostart(profile_id):
+                profile['autologin'] = True
+
             acls = self.get_profile_acls(profile_id)
 
             if self.check_profile_acls(username, acls):
@@ -783,7 +787,7 @@ class X2GoBroker(object):
 
         return list_of_profiles
 
-    def select_session(self, profile_id, username):
+    def select_session(self, profile_id, username=None):
         """\
         Start/resume a session by selecting a profile name offered by the X2Go client.
 
@@ -809,7 +813,7 @@ class X2GoBroker(object):
             remote_agent_port = profile[u'sshport']
             remote_agent = {u'hostname': remote_agent_server, u'port': remote_agent_port, }
 
-        if len(server_list) >= 2:
+        if len(server_list) >= 2 and username:
 
             busy_servers = x2gobroker.agent.find_busy_servers(username=username, query_mode=agent_query_mode, remote_agent = remote_agent)
 
@@ -819,7 +823,6 @@ class X2GoBroker(object):
 
             busy_server_list = [ (load, server) for server, load in busy_servers.items() ]
             busy_server_list.sort()
-            print busy_server_list
 
             best_server = busy_server_list[0][1]
 
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index 9ec4321..c9fd55b 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -143,7 +143,6 @@ class X2GoBrokerWeb:
 
                     output += "END_USER_SESSIONS\n"
 
-
             elif task == 'selectsession':
 
                 if profile_id:


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).




More information about the x2go-commits mailing list