fix run_command of a non-existent command

This commit is contained in:
Michael Hudson-Doyle 2016-11-22 21:31:51 +13:00
parent 4f2138d161
commit 65daafde05
1 changed files with 2 additions and 0 deletions

View File

@ -144,6 +144,8 @@ def run_command(command, timeout=None, shell=False):
"""
p = run_command_start(command, timeout, shell)
log.debug('calling communicate()')
if isinstance(p, dict): # only in error cases
return p
stdout, stderr = p.communicate()
return run_command_summarize(p, stdout, stderr)