Skip to content

Commit 3293cc4

Browse files
committed
Correct issue with env handling
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
1 parent f4448b3 commit 3293cc4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ivpm/ivpm_subprocess.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ def ivpm_popen(cmd, **kwargs):
2626

2727
if proj_info is None:
2828
raise Exception("Failed to read ivpm.yaml @ %s" % ivpm_project)
29-
30-
env = getattr(kwargs, "env", os.environ.copy())
29+
30+
if "env" in kwargs.keys():
31+
env = kwargs["env"]
32+
else:
33+
env = os.environ.copy()
3134
env["IVPM_PROJECT"] = ivpm_project
3235
env["IVPM_PACKAGES"] = os.path.join(ivpm_project, "packages")
3336

0 commit comments

Comments
 (0)