X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FSwig%2FMEDLoaderCouplingTrainingSession.py;h=730772680b27ae39f79e1275d27503e62de6978c;hb=0b187729ac99d3e9e9bb9d2be8cb8600a783be6c;hp=24520950dfe1d11f1ee959c9ba5f939e305caec3;hpb=6df2e0e16579c65de3b7ddf71bcc1ab995258fb1;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/Swig/MEDLoaderCouplingTrainingSession.py b/src/MEDLoader/Swig/MEDLoaderCouplingTrainingSession.py index 24520950d..730772680 100644 --- a/src/MEDLoader/Swig/MEDLoaderCouplingTrainingSession.py +++ b/src/MEDLoader/Swig/MEDLoaderCouplingTrainingSession.py @@ -482,10 +482,10 @@ from math import acos med_root_dir=os.getenv("MEDCOUPLING_ROOT_DIR") if med_root_dir: - agitateur_file=os.path.join(os.getenv("MEDCOUPLING_ROOT_DIR"),"share","resources","med","agitateur.med") -else: - current_dir = os.path.dirname(os.path.realpath(__file__)) - agitateur_file=os.path.join(current_dir, "..", "..", "..", "resources","agitateur.med") + agitateur_file = os.path.join(os.getenv("MEDCOUPLING_ROOT_DIR"),"share","resources","med","agitateur.med") + if not os.path.exists(agitateur_file): + current_dir = os.path.dirname(os.path.realpath(__file__)) + agitateur_file=os.path.join(current_dir, "..", "..", "..", "resources","agitateur.med") pass data=MEDFileData(agitateur_file) ts=data.getFields()[0].getTimeSteps()