Nir Soffer has uploaded a new change for review.

Change subject: alignmentScan: Use proper environment
......................................................................

alignmentScan: Use proper environment

In commit f9d12864a404 (v2v: Running virt-v2v with some sane
environment) we leaned that we should not use bare environment dict.
This patch fixes the environment when running virt-alignment-scan.

Change-Id: I522ea5454a77b06e833723e0995ccbdeab9e5e5e
Signed-off-by: Nir Soffer <nsof...@redhat.com>
---
M vdsm/alignmentScan.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/64123/1

diff --git a/vdsm/alignmentScan.py b/vdsm/alignmentScan.py
index 0957c05..3c72a9b 100644
--- a/vdsm/alignmentScan.py
+++ b/vdsm/alignmentScan.py
@@ -19,6 +19,7 @@
 #
 
 
+import os
 from collections import namedtuple
 from vdsm.utils import CommandPath
 from vdsm.storage.misc import execCmd
@@ -40,10 +41,12 @@
 def runScanArgs(*args):
     cmd = [_virtAlignmentScan.cmd]
     cmd.extend(args)
-    # TODO: remove the environment variable when the issue in
+    # TODO: remove the environment when the issue in
     # virt-alignment-scan/libvirt is resolved
     # http://bugzilla.redhat.com/1151838
-    return execCmd(cmd, env={'LIBGUESTFS_BACKEND': 'direct'})
+    env = os.environ.copy()
+    env['LIBGUESTFS_BACKEND'] = 'direct'
+    return execCmd(cmd, env=env)
 
 
 def scanImage(image_path):


-- 
To view, visit https://gerrit.ovirt.org/64123
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I522ea5454a77b06e833723e0995ccbdeab9e5e5e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsof...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to