From 867c9b9830f6a209044bcdf211177b1152611d4e Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Mon, 18 Feb 2019 17:32:32 +0100 Subject: [PATCH] Ban noisy messages --- bin/salomeContext.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 7a5b8e2db..85d132655 100755 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -102,17 +102,15 @@ class SalomeContext: # def __loadEnvModules(self, env_modules): - print("Trying to load env modules: %s ..." % ' '.join(env_modules)) modulecmd = os.getenv('LMOD_CMD') if not modulecmd: - print('Module environment not present') + raise SalomeContextException("Module environment not present") return try: out, err = subprocess.Popen([modulecmd, "python", "load"] + env_modules, stdout=subprocess.PIPE).communicate() exec(out) # define specific environment variables - print("OK") except: - print("** Failed **") + raise SalomeContextException("Failed to load env modules: %s ..." % ' '.join(env_modules)) pass # -- 2.39.2