From Dan Kenigsberg <>:

Dan Kenigsberg has uploaded a new change for review.

Change subject: tool.service: avoid execCmd(raw=False)

tool.service: avoid execCmd(raw=False)

tool.service is the only place where we use raw=False to split lines in
command output. However, we concatenate these lines immediately
afterwards, or ignore them.

This patch would enable the removal of the `raw` argument from execCmd
in a future patch.

Change-Id: I7530451496c41d1f3568e263f1087a92a8f0f3bb
Signed-off-by: Dan Kenigsberg <>
M lib/vdsm/tool/
1 file changed, 4 insertions(+), 8 deletions(-)

  git pull ssh:// refs/changes/13/80213/1

diff --git a/lib/vdsm/tool/ b/lib/vdsm/tool/
index b720b4a..f7fd9e7 100644
--- a/lib/vdsm/tool/
+++ b/lib/vdsm/tool/
@@ -30,11 +30,7 @@
 from vdsm.common.cmdutils import CommandPath
 from . import expose, UsageError, ExtraArgsError
-from ..commands import execCmd as _execCmd
-def execCmd(argv, raw=True, *args, **kwargs):
-    return _execCmd(argv, raw=raw, *args, **kwargs)
+from ..commands import execCmd
 _SYSTEMCTL = CommandPath("systemctl",
@@ -108,10 +104,10 @@
         def wrapper(srvName):
             cmd = [_SYSTEMCTL.cmd, "--no-pager", "list-unit-files"]
-            rc, out, err = execCmd(cmd, raw=False)
+            rc, out, err = execCmd(cmd)
             if rc != 0:
                 raise ServiceOperationError(
-                    "Error listing unit files", '\n'.join(out), '\n'.join(err))
+                    "Error listing unit files", out, err)
             fullName = srvName
             # If unit file type was specified, don't override it.
             if srvName.count('.') < 1:
@@ -179,7 +175,7 @@
         def wrapper(srvName):
             cmd = [_INITCTL.cmd, "usage", srvName]
-            rc, out, err = execCmd(cmd, raw=False)
+            rc, out, err = execCmd(cmd)
             if rc != 0:
                 raise ServiceNotExistError("%s is not an Upstart service" %

To view, visit
To unsubscribe, visit

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7530451496c41d1f3568e263f1087a92a8f0f3bb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <>
vdsm-patches mailing list --
To unsubscribe send an email to

Reply via email to