This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2gobroker. from e214001 uccs frontend: Convert datetime.datetime object to string before answering the http request with it. new d784516 x2gobroker-testagent: Convert to Python3 (using 2to3 tool). new dfb81e4 x2gobroker-loadchecker: Python3'ify iteration over dict keys. new 1c870b3 x2gobroker-pubkeyauthorizer: Tiny Python2to3 fix. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: sbin/x2gobroker-loadchecker | 2 +- sbin/x2gobroker-pubkeyauthorizer | 2 +- sbin/x2gobroker-testagent | 106 +++++++++++++++++++-------------------- 3 files changed, 55 insertions(+), 55 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit d78451647273ea50aa4a4716b853268c286bc710 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Apr 30 14:09:21 2018 +0200 x2gobroker-testagent: Convert to Python3 (using 2to3 tool). --- sbin/x2gobroker-testagent | 106 +++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/sbin/x2gobroker-testagent b/sbin/x2gobroker-testagent index 4c4587d..d133527 100755 --- a/sbin/x2gobroker-testagent +++ b/sbin/x2gobroker-testagent @@ -81,23 +81,23 @@ if __name__ == "__main__": if os.getuid() != 0: p.print_help() - print - print "*** The {progname} tool needs to be run with super-user privileges... ***".format(progname=PROG_NAME) - print + print () + print(("*** The {progname} tool needs to be run with super-user privileges... ***".format(progname=PROG_NAME))) + print () sys.exit(-1) if cmdline_args.username is None and not cmdline_args.list_tasks and cmdline_args.task not in ('ping', 'checkload'): p.print_help() - print - print "*** Cannot continue without username... ***" - print + print () + print ("*** Cannot continue without username... ***") + print () sys.exit(-1) if cmdline_args.task in ('suspendsession', 'terminatesession') and not cmdline_args.session_id: p.print_help() - print - print "*** Cannot continue on this task without a given session ID... ***" - print + print () + print ("*** Cannot continue on this task without a given session ID... ***") + print () sys.exit(0); if cmdline_args.config_file is not None: @@ -133,13 +133,13 @@ def call_agent(task, **kwargs): try: _result = agent_client_tasks[task](username=username, query_mode=query_mode, remote_agent=remote_agent, **kwargs) if _result == True: - print "The broker agent could be reached but the task returned no printable output (which probably is fine)." - print + print("The broker agent could be reached but the task returned no printable output (which probably is fine).") + print() return _result except KeyError: - print "No such task: '{task_name}'. Use --list-tasks to view information about".format(task_name=task) - print "available tasks." - print + print("No such task: '{task_name}'. Use --list-tasks to view information about".format(task_name=task)) + print("available tasks.") + print() return False if __name__ == "__main__": @@ -147,36 +147,36 @@ if __name__ == "__main__": # drop root privileges and run as X2GOBROKER_DAEMON_USER drop_privileges(uid=x2gobroker.defaults.X2GOBROKER_DAEMON_USER, gid=x2gobroker.defaults.X2GOBROKER_DAEMON_GROUP) - print - print "X2Go Session Broker (Agent Test Utility)" - print "----------------------------------------" + print() + print("X2Go Session Broker (Agent Test Utility)") + print("----------------------------------------") agent_client_tasks = x2gobroker.agent.tasks if 'availabletasks' in agent_client_tasks: try: remote_agent_tasks = x2gobroker.agent.tasks_available(username=username, query_mode=query_mode, remote_agent=remote_agent) - except x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException, e: - print "{errmsg}.".format(errmsg=e) - print + except x2gobroker.x2gobroker_exceptions.X2GoBrokerAgentException as e: + print("{errmsg}.".format(errmsg=e)) + print() sys.exit(0) if not local_agent and not x2gobroker.agent.has_remote_broker_agent_setup(): - print "This instance of X2Go Session Broker is not able to contact any remote" - print "X2Go Session Broker Agent instances. Check this broker's SSH setup!!!" - print - print "Aborting any futher tests..." + print("This instance of X2Go Session Broker is not able to contact any remote") + print("X2Go Session Broker Agent instances. Check this broker's SSH setup!!!") + print() + print("Aborting any futher tests...") sys.exit(-1) if list_tasks: - print "The queried broker agent supports these tasks / features:" - print + print("The queried broker agent supports these tasks / features:") + print() for task in remote_agent_tasks: try: - print " {task_name}: {task_function_obj}".format(task_name=task, task_function_obj=agent_client_tasks[task]) + print(" {task_name}: {task_function_obj}".format(task_name=task, task_function_obj=agent_client_tasks[task])) except KeyError: - print " {task_name}: not supported by this broker version".format(task_name=task) - print + print(" {task_name}: not supported by this broker version".format(task_name=task)) + print() sys.exit(0); kwargs = {} @@ -196,42 +196,42 @@ if __name__ == "__main__": result = call_agent(task, **kwargs) if type(result) is dict: - print "\n".join(result) - print + print("\n".join(result)) + print() elif task.startswith('findbusyservers') and type(result) is dict: if result: - print "\n".join([ "{host} -- {usage}%".format(host=host, usage=usage) for host, usage in result.items() ]) + print("\n".join([ "{host} -- {usage}%".format(host=host, usage=usage) for host, usage in list(result.items()) ])) else: - print "X2Go Server busy state: All servers are idle." + print("X2Go Server busy state: All servers are idle.") # even an empty dict means, that we have been successful... result = True - print + print() if task == 'addauthkey' and result: on_host = " on {host}".format(host=cmdline_args.host) if cmdline_args.host != 'LOCAL' else "" - print "NOTE: This test-run added the below SSH public key to X2Go's authorized_keys file" - print " for user '{username}{on_host}'.".format(username=username, on_host=on_host) - print - print " The file location for this normally is $HOME/.x2go/authorized_keys." - print " MAKE SURE TO REMOVE THIS KEY MANUALLY (or use test the 'delauthkey' task)!!!" - print - print pubkey - print + print("NOTE: This test-run added the below SSH public key to X2Go's authorized_keys file") + print(" for user '{username}{on_host}'.".format(username=username, on_host=on_host)) + print() + print(" The file location for this normally is $HOME/.x2go/authorized_keys.") + print(" MAKE SURE TO REMOVE THIS KEY MANUALLY (or use test the 'delauthkey' task)!!!") + print() + print(pubkey) + print() if task == 'delauthkey' and result: on_host = " on {host}".format(host=cmdline_args.host) if cmdline_args.host != 'LOCAL' else "" - print "NOTE: This test-run attempted to remove all occurences of the below SSH public key from" - print " X2Go's authorized_keys file for user '{username}{on_host}'.".format(username=username, on_host=on_host) - print - print " The file location for this normally is $HOME/.x2go/authorized_keys." - print " PLEASE DOUBLE-CHECK THE USER'S authorized_keys file MANUALLY!!!" - print - print pubkey - print + print("NOTE: This test-run attempted to remove all occurences of the below SSH public key from") + print(" X2Go's authorized_keys file for user '{username}{on_host}'.".format(username=username, on_host=on_host)) + print() + print(" The file location for this normally is $HOME/.x2go/authorized_keys.") + print(" PLEASE DOUBLE-CHECK THE USER'S authorized_keys file MANUALLY!!!") + print() + print(pubkey) + print() where = "local" if query_mode == "LOCAL" else "remote" if result: - print "The task '{task_name}' could be executed successfully on the {where} broker agent.".format(task_name=task, where=where) + print("The task '{task_name}' could be executed successfully on the {where} broker agent.".format(task_name=task, where=where)) else: - print "The task '{task_name}' failed to execute on the {where} broker agent.".format(task_name=task, where=where) - print + print("The task '{task_name}' failed to execute on the {where} broker agent.".format(task_name=task, where=where)) + print() -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit dfb81e4d68aef14f07e1101af4785bb5a2479bff Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Apr 30 14:14:05 2018 +0200 x2gobroker-loadchecker: Python3'ify iteration over dict keys. --- sbin/x2gobroker-loadchecker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/x2gobroker-loadchecker b/sbin/x2gobroker-loadchecker index eb87c7d..49f55ba 100755 --- a/sbin/x2gobroker-loadchecker +++ b/sbin/x2gobroker-loadchecker @@ -87,7 +87,7 @@ class LoadCheckerServiceHandler(asyncore.dispatcher_with_send): else: load_factors = load_checker.get_profile_load(backend, profile_id) if load_factors: - for h in load_factors.keys(): + for h in list(load_factors.keys()): if load_factors[h] is not None: output +="{hostname}:{loadfactor}\n".format(hostname=h, loadfactor=load_factors[h]) if self.logger: self.logger.info('LoadCheckServiceHandler.handle_read(): load check result for backend={backend}, profile_id={profile_id}, hostname={hostname}: {lf}'.format(backend=backend, profile_id=profile_id, hostname=h, lf=load_factors[h])) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2gobroker. commit 1c870b307992e0575cc7572c33e8ba04c5779056 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Apr 30 14:14:21 2018 +0200 x2gobroker-pubkeyauthorizer: Tiny Python2to3 fix. --- sbin/x2gobroker-pubkeyauthorizer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/x2gobroker-pubkeyauthorizer b/sbin/x2gobroker-pubkeyauthorizer index e171c79..6a9af5a 100755 --- a/sbin/x2gobroker-pubkeyauthorizer +++ b/sbin/x2gobroker-pubkeyauthorizer @@ -108,7 +108,7 @@ if __name__ == '__main__': del opt['args'] p_group.add_argument(*args, **opt) - print + print () cmdline_args = p.parse_args() if cmdline_args.broker_url is None: -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gobroker.git