pass
-def run_cmd(cmd="", ignore_errors=False, vm=None):
+def run_cmd(cmd="", ignore_errors=False, vm=None, timeout=60):
"""
Universal command run wrapper.
:param bool ignore_errors: whether not to raise error on command failure
:param vm: vm to run on if running on a guest instead of the host
:type vm: VM object or None
+ :param int timeout: amount of seconds to wait for the program to run
:returns: command result output
:rtype: str
:raises: :py:class:`OSError` if command failed and cannot be ignored
"""
if vm is not None:
- status, stdout = vm.session.cmd_status_output(cmd)
+ status, stdout = vm.session.cmd_status_output(cmd, timeout=timeout)
stdout = stdout.encode()
stderr = b""
if status != 0: