This is an automated email from the ASF dual-hosted git repository.
hapylestat pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 7f9a9b4 AMBARI-22966 ambari-agent fails to start (dgrinenko)
7f9a9b4 is described below
commit 7f9a9b4524cc4f415eb0141279c52f2b6bcee5ce
Author: Reishin <[email protected]>
AuthorDate: Mon Feb 12 20:42:33 2018 +0200
AMBARI-22966 ambari-agent fails to start (dgrinenko)
---
ambari-common/src/main/python/ambari_commons/shell.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ambari-common/src/main/python/ambari_commons/shell.py
b/ambari-common/src/main/python/ambari_commons/shell.py
index 3f4ccac..8488ef8 100644
--- a/ambari-common/src/main/python/ambari_commons/shell.py
+++ b/ambari-common/src/main/python/ambari_commons/shell.py
@@ -27,7 +27,6 @@ from contextlib import contextmanager
from ambari_commons import OSConst
from ambari_commons.os_family_impl import OsFamilyImpl, OsFamilyFuncImpl
-from resource_management.core import sudo
logger = logging.getLogger()
@@ -353,6 +352,8 @@ def kill_process_with_children(base_pid):
Process tree killer
:type base_pid int
"""
+ from resource_management.core import sudo # to avoid circular dependency
+
exception_list = ["apt-get", "apt", "yum", "zypper", "zypp"]
signals_to_post = {
"SIGTERM": signal.SIGTERM,
@@ -401,7 +402,7 @@ class shellRunnerLinux(shellRunner):
import pwd
try:
- if user != None:
+ if user is not None:
user = pwd.getpwnam(user)[2]
else:
user = os.getuid()
--
To stop receiving notification emails like this one, please contact
[email protected].