diff --git a/tests/common/reboot.py b/tests/common/reboot.py index 1f796b7c52b..1aeae3e4fef 100644 --- a/tests/common/reboot.py +++ b/tests/common/reboot.py @@ -114,7 +114,7 @@ def execute_reboot_helper(): timeout=timeout, module_ignore_errors=True) - if 'failed' in res or ('msg' in res and 'Timeout' in res['msg']): + if res.is_failed or ('msg' in res and 'Timeout' in res['msg']): if reboot_res.ready(): logger.error('reboot result: {}'.format(reboot_res.get())) raise Exception('DUT did not shutdown') @@ -131,7 +131,7 @@ def execute_reboot_helper(): delay=delay, timeout=timeout, module_ignore_errors=True) - if 'failed' in res or ('msg' in res and 'Timeout' in res['msg']): + if res.is_failed or ('msg' in res and 'Timeout' in res['msg']): raise Exception('DUT did not startup') logger.info('ssh has started up')