diff options
author | Mate Lakat <mate.lakat@citrix.com> | 2013-08-24 10:51:09 +0100 |
---|---|---|
committer | Mate Lakat <mate.lakat@citrix.com> | 2013-08-27 10:43:32 +0100 |
commit | 36be3145c76d185ecabac20c4df145b7f46f67b1 (patch) | |
tree | 728d7307e1c19b40680c6ed4db4d347fd36ca127 /plugins/xenserver/xenapi | |
parent | 1b0165b8087b64fb667998118cc41d6909a2e36f (diff) | |
download | nova-36be3145c76d185ecabac20c4df145b7f46f67b1.tar.gz |
Add env to make_subprocess
Due to a previous commit, a client of make_subprocess is making a call
with an env parameter. As make_subprocess does not have such a
parameter, image upload fails. This patch adds the env keyword argument
to make_subprocess, and use that in the Popen call.
Fixes bug 1216267
Change-Id: I8098b484067b54c15fe95f2bf84c5890db7ebcb3
Diffstat (limited to 'plugins/xenserver/xenapi')
-rw-r--r-- | plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py index cd932c328c..ccf1356ab7 100644 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py @@ -59,7 +59,7 @@ def _rename(src, dst): def make_subprocess(cmdline, stdout=False, stderr=False, stdin=False, - universal_newlines=False, close_fds=True): + universal_newlines=False, close_fds=True, env=None): """Make a subprocess according to the given command-line string """ LOG.info("Running cmd '%s'" % " ".join(cmdline)) @@ -69,6 +69,7 @@ def make_subprocess(cmdline, stdout=False, stderr=False, stdin=False, kwargs['stdin'] = stdin and subprocess.PIPE or None kwargs['universal_newlines'] = universal_newlines kwargs['close_fds'] = close_fds + kwargs['env'] = env try: proc = subprocess.Popen(cmdline, **kwargs) except OSError, e: |