Fix some whitespace and line breaks
[pyi2ncommon] / src / arnied_wrapper.py
index b6d79d0..774e835 100644 (file)
@@ -83,8 +83,9 @@ def run_cmd(cmd="", ignore_errors=False, vm=None, timeout=60):
     :param vm: vm to run on if running on a guest instead of the host
     :type vm: :py:class:`virttest.qemu_vm.VM` or None
     :param int timeout: amount of seconds to wait for the program to run
-    :returns: command result output
-    :rtype: str
+    :returns: command result output where output (stdout/stderr) is bytes
+              (encoding dependent on environment and command given)
+    :rtype: :py:class:`subprocess.CompletedProcess`
     :raises: :py:class:`OSError` if command failed and cannot be ignored
     """
     if vm is not None:
@@ -96,9 +97,11 @@ def run_cmd(cmd="", ignore_errors=False, vm=None, timeout=60):
             stdout = b""
             if not ignore_errors:
                 raise subprocess.CalledProcessError(status, cmd, stderr=stderr)
-        return subprocess.CompletedProcess(cmd, status, stdout=stdout, stderr=stderr)
+        return subprocess.CompletedProcess(cmd, status,
+                                           stdout=stdout, stderr=stderr)
     else:
-        return subprocess.run(cmd, check=not ignore_errors, shell=True, capture_output=True)
+        return subprocess.run(cmd, check=not ignore_errors, shell=True,
+                              capture_output=True)
 
 
 def verify_running(process='arnied', timeout=60, vm=None):