From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: move exec_sync_bytes to common.cmdutils
......................................................................
Patch Set 4:
(1 comment)
https://gerrit.ovirt.org/#/c/79693/4/lib/vdsm/common/cmdutils.py
File lib/vdsm/common/cmdutils.py:
Line 111: Memory = 'Memory'
Line 112: BlockIO = 'BlockIO'
Line 113:
Line 114:
Line 115: def exec_sync_bytes(cmds):
I just suggested a nicer name. I don't want to have name like
exec_sync_byt
I don't know what you mean by default behavior.
It is important to keep encoding mess local to function that communicate with the external
world. However, some external commands may return non-ut8 bytestring, so we cannot decode
at this low level.
I feel very bad about this, and want to warn the users of this function about this fact.
The problem with a nicer name like `run` is that may lead someone (e.g. me) to understand
it has a signature similar to that of subprocess.run.
How about a plain exec_cmd()?
Line 116: logging.debug(command_log_line(cmds))
Line 117:
Line 118: p = Popen(
Line 119: cmds, close_fds=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
--
To view, visit
https://gerrit.ovirt.org/79693
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Idca5b123a4ce6ef5ebaff8084d788e2acd47c2be
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes