From 6ff67b87db1418690bf675e209246c3d21cdd488 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Ribes?= Date: Fri, 1 Apr 2011 13:48:00 +0200 Subject: [PATCH] =?utf8?q?Permet=20de=20cr=C3=A9er=20le=20.py=20pour=20la?= =?utf8?q?=20g=C3=A9n=C3=A9ration=20du=20sch=C3=A9ma=20s'il=20n'existe=20p?= =?utf8?q?as?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/daSalome/daGUI/daGuiImpl/adaoCase.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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" -- 2.39.2