未验证 提交 5a326011 编写于 作者: X Xu Han 提交者: GitHub

Merge pull request #1348 from luckyh/fix-cmderror

Fix issues of using avocado.utils.process.CmdError
......@@ -35,7 +35,7 @@ def run(test, params, env):
try:
process.run(cmd)
except process.CmdError as e:
if not re.findall(catch_data, str(e)):
if not re.findall(catch_data, e.result.stdout):
test.fail("Client not connected '%s'" % str(e))
logging.info("Client multicast test pass "
% re.findall(catch_data, str(e)))
......
......@@ -74,10 +74,11 @@ def run(test, params, env):
try:
output = process.system_output(cmd, verbose=False)
except process.CmdError as err:
if "does not support checks" in str(err):
result_stderr = err.result.stderr
if "does not support checks" in result_stderr:
return (True, "")
else:
return (False, str(err))
return (False, result_stderr)
return (True, output)
def check_test(cmd):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册