未验证 提交 c7b6b68b 编写于 作者: L Lukáš Doktor

Merge commit 'cb17bd2a' Check stderr when service do not exists

......@@ -117,11 +117,11 @@ def sys_v_init_result_parser(command):
"""
# If service is stopped, exit_status is also not zero.
# So, we can't use exit_status to check result.
output = cmd_result.stdout.lower()
# Returns None if XXX is unrecognized.
if re.search(r"unrecognized", output):
if re.search(r"unrecognized", cmd_result.stderr.lower()):
return None
# Returns False if XXX is stopped.
output = cmd_result.stdout.lower()
dead_flags = [r"stopped", r"not running", r"dead"]
for flag in dead_flags:
if re.search(flag, output):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册