[X2Go-Commits] [x2gobroker] 02/02: agent.py: Set result to None, if SSH connection to broker agent fails.

git-admin at x2go.org git-admin at x2go.org
Fri Mar 27 10:28:20 CET 2015


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

x2go pushed a commit to branch master
in repository x2gobroker.

commit 31bf2e4f0eb5c3e9a0318fba304f4410272062ef
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Mar 27 10:18:44 2015 +0100

    agent.py: Set result to None, if SSH connection to broker agent fails.
---
 debian/changelog    |    1 +
 x2gobroker/agent.py |    1 +
 2 files changed, 2 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6ad6066..c7d336d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -249,6 +249,7 @@ x2gobroker (0.0.3.0-0x2go1) UNRELEASED; urgency=low
       for logging actions taken place in agent.py.
     - agent.py: Make agent query mode LOCAL behave similar to agent query mode
       SSH if things go wrong.
+    - agent.py: Set result to None, if SSH connection to broker agent fails.
   * debian/control:
     + Provide separate bin:package for SSH brokerage: x2gobroker-ssh.
     + Replace LDAP support with session brokerage support in LONG_DESCRIPTION.
diff --git a/x2gobroker/agent.py b/x2gobroker/agent.py
index 15486bf..04591b2 100644
--- a/x2gobroker/agent.py
+++ b/x2gobroker/agent.py
@@ -227,6 +227,7 @@ def _call_remote_broker_agent(username, task, cmdline_args=[], remote_agent=None
                 err = stderr.read().replace('\n', ' ')
                 if err:
                     logger.warning('Remote agent command (host: {hostname} ({hostaddr})) reported an error: {err}'.format(hostname=remote_hostname, hostaddr=remote_hostaddr, err=err))
+                    result = None
             client.close()
             if result:
                 logger.info('Broker agent answered: {answer}'.format(answer="; ".join(result)))

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


More information about the x2go-commits mailing list