RHEL8 bugfix for module_cmd (#14349)

This commit is contained in:
Sajid Ali 2020-01-02 15:30:11 -06:00 committed by Todd Gamblin
parent 69e5683ba4
commit 4da8f7fcef

View file

@ -9,6 +9,7 @@
""" """
import subprocess import subprocess
import os import os
import sys
import json import json
import re import re
@ -31,7 +32,7 @@ def module(*args):
if args[0] in module_change_commands: if args[0] in module_change_commands:
# Do the module manipulation, then output the environment in JSON # Do the module manipulation, then output the environment in JSON
# and read the JSON back in the parent process to update os.environ # and read the JSON back in the parent process to update os.environ
module_cmd += ' >/dev/null; python -c %s' % py_cmd module_cmd += ' >/dev/null;' + sys.executable + ' -c %s' % py_cmd
module_p = subprocess.Popen(module_cmd, module_p = subprocess.Popen(module_cmd,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,