separate stdout and stderr for module loading (#6713)

This commit is contained in:
becker33 2017-12-21 16:27:52 -08:00 committed by GitHub
parent f2e061debf
commit feb4f1b387
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,7 +133,10 @@ def load_module(mod):
exec(compile(modulecmd('unload', text[i + 1], output=str,
error=str), '<string>', 'exec'))
# Load the module now that there are no conflicts
load = modulecmd('load', mod, output=str, error=str)
# Some module systems use stdout and some use stderr
load = modulecmd('load', mod, output=str, error='/dev/null')
if not load:
load = modulecmd('load', mod, error=str)
exec(compile(load, '<string>', 'exec'))