Changed modulecmd parameters. return_oe is not one of the parameters in the mainline spack repo. Changed the args to the appropriate ones in the new spack

This commit is contained in:
Mario Melara 2016-04-04 13:44:24 -07:00
parent 7e9baf9e25
commit 9c071ea40d

View file

@ -285,16 +285,15 @@ def find_in_path(cls, *path):
@classmethod
def find_in_modules(cls):
compilers = []
if cls.PrgEnv:
if not cls.PrgEnv_compiler:
tty.die('Must supply PrgEnv_compiler with PrgEnv')
modulecmd = which('modulecmd')
modulecmd.add_default_arg('python')
output = modulecmd('avail', cls.PrgEnv_compiler, return_oe=True)
output = modulecmd('avail', cls.PrgEnv_compiler, output=str, error=str)
matches = re.findall(r'(%s)/([\d\.]+[\d])' % cls.PrgEnv_compiler, output)
for name, version in matches:
v = version
comp = cls(spack.spec.CompilerSpec(name + '@' + v), 'MODULES',