From: Paul RASCLE Date: Fri, 28 Jul 2017 11:21:49 +0000 (+0200) Subject: Horrible hack to allow a correct load of a Telemac case file when done after X-Git-Tag: Salome_8_3_Hydro_2_0rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dc01f4844947809767f04ad2f305fd06b452c010;p=modules%2Fhydrosolver.git Horrible hack to allow a correct load of a Telemac case file when done after some other edition, such as create case for Pytel execution. --- diff --git a/src/salome_hydro/telemac2d/eficas/appli.py b/src/salome_hydro/telemac2d/eficas/appli.py index 834af00..69b982f 100644 --- a/src/salome_hydro/telemac2d/eficas/appli.py +++ b/src/salome_hydro/telemac2d/eficas/appli.py @@ -37,6 +37,18 @@ import eficasSalome from salome.hydro.study import HydroStudyEditor +def importFirst(): + """ + Horrible hack to allow a correct load of a Telemac case file when done after + some other edition, such as create case for Pytel execution. + """ + eficasTelemacPath = os.path.join(eficasSalome.eficasConfig.eficasPath,'Telemac') + sys.path.insert(0, eficasTelemacPath) + from enum_Telemac2d_auto import TelemacdicoEn + sys.path.pop(0) + +importFirst() + class EficasForTelemac2DAppli(eficasSalome.MyEficas): """ This class launches Eficas and adds entries for the created files in