Merge "functional: Check for processes only if there are any"
This commit is contained in:
commit
a292ae544b
@ -64,7 +64,8 @@ class TestGetRootHelperChildPid(functional_base.BaseSudoTestCase):
|
||||
['pstree', parent_pid], check_exit_code=False)
|
||||
processes = [command.strip() for command in proc_tree.split('---')
|
||||
if command]
|
||||
return 'sleep' == processes[-1]
|
||||
if processes:
|
||||
return 'sleep' == processes[-1]
|
||||
|
||||
cmd = ['bash', '-c', '(sleep 100)']
|
||||
proc = async_process.AsyncProcess(cmd, run_as_root=True)
|
||||
|
Loading…
Reference in New Issue
Block a user