From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has uploaded a new change for review.
Change subject: cmdutils: add env to exec_sync_bytes()'s args ......................................................................
cmdutils: add env to exec_sync_bytes()'s args
Expose Popen's env argument throught exec_sync_bytes()
Change-Id: I109c50c4dd85347e12e8a9a11963b0cded685536 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/common/cmdutils.py 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/79694/1
diff --git a/lib/vdsm/common/cmdutils.py b/lib/vdsm/common/cmdutils.py index 26e08a7..c4b1d31 100644 --- a/lib/vdsm/common/cmdutils.py +++ b/lib/vdsm/common/cmdutils.py @@ -110,11 +110,12 @@ BlockIO = 'BlockIO'
-def exec_sync_bytes(cmds): +def exec_sync_bytes(cmds, env=None): logging.debug(cmdutils.command_log_line(cmds))
p = Popen( - cmds, close_fds=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + cmds, close_fds=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + env=env)
out, err = p.communicate()