From: André Ribes Date: Fri, 1 Apr 2011 11:48:00 +0000 (+0200) Subject: Permet de créer le .py pour la génération du schéma s'il n'existe pas X-Git-Tag: V6_4_0rc3~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6ff67b87db1418690bf675e209246c3d21cdd488;p=modules%2Fadao.git Permet de créer le .py pour la génération du schéma s'il n'existe pas --- diff --git a/src/daSalome/daGUI/daGuiImpl/adaoCase.py b/src/daSalome/daGUI/daGuiImpl/adaoCase.py index 527e51f..602ec91 100644 --- a/src/daSalome/daGUI/daGuiImpl/adaoCase.py +++ b/src/daSalome/daGUI/daGuiImpl/adaoCase.py @@ -68,10 +68,13 @@ class AdaoCase: filename = self.filename[:self.filename.rfind(".")] + '.py' if not os.path.exists(filename): - msg = "Cannot find the py file for YACS generation \n" - msg += "Is your case correct ? \n" - msg += "(Try to load: " + filename + ")" - return msg + # On essaye de le créer une fois + self.eficas_editor.modified = True + self.eficas_editor.saveFile() + if not os.path.exists(filename): + msg = "Cannot find the py file for YACS generation \n" + msg += "Is your case correct ? \n" + return msg if not os.environ.has_key("ADAO_ROOT_DIR"): return "Please add ADAO_ROOT_DIR to your environnement"