From 6ba79d74d58573257578ed1c12bef40af75055f5 Mon Sep 17 00:00:00 2001 From: vincentcasseau Date: Mon, 17 Jun 2024 11:50:38 +0200 Subject: [PATCH] KCore: notify - minor --- Cassiopee/CPlot/apps/validCassiopee.py | 3 ++- Cassiopee/Envs/env_Cassiopee_local | 1 + Cassiopee/Envs/sh_Cassiopee_local | 7 ++++--- Cassiopee/KCore/test/notifyInstall.py | 6 ++++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Cassiopee/CPlot/apps/validCassiopee.py b/Cassiopee/CPlot/apps/validCassiopee.py index 6080f2a8d..e45e0cfca 100644 --- a/Cassiopee/CPlot/apps/validCassiopee.py +++ b/Cassiopee/CPlot/apps/validCassiopee.py @@ -1558,7 +1558,8 @@ def notifyValidOK(): messageSubject='[Cassiopee] Ready to commit', messageText=messageText) except ImportError: - raise SystemError("Error: KCore is required to import notify.") + print("Error: KCore is required to import notify.") + sys.exit() #============================================================================== def Quit(event=None): diff --git a/Cassiopee/Envs/env_Cassiopee_local b/Cassiopee/Envs/env_Cassiopee_local index 1eb6e65bd..f8778d7e4 100644 --- a/Cassiopee/Envs/env_Cassiopee_local +++ b/Cassiopee/Envs/env_Cassiopee_local @@ -94,6 +94,7 @@ else if ($MAC == "ld") then #------------------------------- ld rocky 8 + python 3 ----------------------------------- setenv ELSAPROD ld setenv ELSAPROD "$ELSAPROD$INTTYPE" + . /etc/profile.d/modules-onera.sh module purge module load occt/7.6.1-gnu831 module load python/3.8.14-gnu831 diff --git a/Cassiopee/Envs/sh_Cassiopee_local b/Cassiopee/Envs/sh_Cassiopee_local index c8c856e43..54859e9da 100644 --- a/Cassiopee/Envs/sh_Cassiopee_local +++ b/Cassiopee/Envs/sh_Cassiopee_local @@ -79,6 +79,7 @@ elif [ "$MAC" = "ld" ]; then #------------------------------- ld centos 8 + python 3 ----------------------------------- export ELSAPROD=ld export ELSAPROD=$ELSAPROD$INTTYPE + . /etc/profile.d/modules-onera.sh module purge module load occt/7.6.1-gnu831 module load python/3.8.14-gnu831 @@ -726,17 +727,17 @@ if ! [ -z $OLD_PATHL ]; then fi # Prefix with new paths -if [ -n $PATH ]; then +if [ -n "$PATH" ]; then export PATH=$PATHL:$PATH else export PATH=$PATHL fi -if [ -n $LD_LIBRARY_PATH ]; then +if [ -n "$LD_LIBRARY_PATH" ]; then export LD_LIBRARY_PATH=$LD_LIBRARY_PATHL:$LD_LIBRARY_PATH else export LD_LIBRARY_PATH=$LD_LIBRARY_PATHL fi -if [ -n $PYTHONPATH ]; then +if [ -n "$PYTHONPATH" ]; then export PYTHONPATH=$PYTHONPATHL:$PYTHONPATH else export PYTHONPATH=$PYTHONPATHL diff --git a/Cassiopee/KCore/test/notifyInstall.py b/Cassiopee/KCore/test/notifyInstall.py index 6025fc957..1eba57b3f 100644 --- a/Cassiopee/KCore/test/notifyInstall.py +++ b/Cassiopee/KCore/test/notifyInstall.py @@ -2,6 +2,7 @@ # status of different prods. Please set the environment variable CASSIOPEE_EMAIL # Usage: python notifyInstall.py --recipients='a.b@onera.fr c.d@onera.fr' import os +import sys from time import strptime, strftime # Parse command-line arguments @@ -19,7 +20,7 @@ def parseArgs(): script_args = parseArgs() recipients = script_args.recipients.split(' ') if not recipients[0]: - recipients = ['vincent.casseau@onera.fr'] #, 'christophe.benoit@onera.fr'] + recipients = ['vincent.casseau@onera.fr', 'christophe.benoit@onera.fr'] # Check install status log_entries = [] @@ -44,4 +45,5 @@ def parseArgs(): messageSubject="[Installation] State: {}".format(baseState), messageText=messageText) except ImportError: - raise SystemError("Error: KCore is required to import notify.") + print("Error: KCore is required to import notify.") + sys.exit()