You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2015/05/13 09:25:05 UTC
ambari git commit: AMBARI-11071 ambari agent is ignoring all env vars
being set for the user when it runs commands (dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk e7fdb7146 -> 0b7f6a8f4
AMBARI-11071 ambari agent is ignoring all env vars being set for the user when it runs commands (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0b7f6a8f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0b7f6a8f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0b7f6a8f
Branch: refs/heads/trunk
Commit: 0b7f6a8f404511e4ead5ed93e3a4c8f362090c24
Parents: e7fdb71
Author: Dmytro Sen <ds...@apache.org>
Authored: Wed May 13 10:24:49 2015 +0300
Committer: Dmytro Sen <ds...@apache.org>
Committed: Wed May 13 10:24:49 2015 +0300
----------------------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/PythonExecutor.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0b7f6a8f/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
index 42e3861..3aa26a0 100644
--- a/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
+++ b/ambari-agent/src/main/python/ambari_agent/PythonExecutor.py
@@ -159,14 +159,11 @@ class PythonExecutor:
to make possible unit testing
"""
close_fds = None if OSCheck.get_os_family() == OSConst.WINSRV_FAMILY else True
-
+ command_env = dict(os.environ)
if OSCheck.get_os_family() == OSConst.WINSRV_FAMILY:
- command_env = dict(os.environ)
command_env["PYTHONPATH"] = os.pathsep.join(sys.path)
for k, v in command_env.iteritems():
command_env[k] = str(v)
- else:
- command_env = None
return subprocess.Popen(command,
stdout=tmpout,