From: Cédric Aguerre Date: Mon, 18 Feb 2019 16:32:32 +0000 (+0100) Subject: Ban noisy messages X-Git-Tag: V9_3_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=867c9b9830f6a209044bcdf211177b1152611d4e;p=modules%2Fkernel.git Ban noisy messages --- 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 #