Salome HOME
PN bug notation scientifique
[tools/eficas.git] / Ihm / I_ETAPE.py
index 3b51fbb6444c90bab0d755a51298bb2bbd435e33..4f3c092e3aa1a54c34baa9d57cc60e6bc8b072a6 100644 (file)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 #            CONFIGURATION MANAGEMENT OF EDF VERSION
 # ======================================================================
 # COPYRIGHT (C) 1991 - 2002  EDF R&D                  WWW.CODE-ASTER.ORG
@@ -153,11 +154,14 @@ class ETAPE(I_MCCOMPO.MCCOMPO):
             # Il n'existe pas de concept de ce nom dans le voisinage de l'etape courante
             # On peut donc créer le concept retourné.
             # Il est créé sans nom mais enregistré dans la liste des concepts existants
-            self.get_sd_prod()
-            # Il suffit de changer son attribut nom pour le nommer
-            self.sd.nom = nom
-            self.sdnom=nom
-            return 1,"Nommage du concept effectué"
+            try:
+               self.get_sd_prod()
+               # Il suffit de changer son attribut nom pour le nommer
+               self.sd.nom = nom
+               self.sdnom=nom
+               return 1,"Nommage du concept effectué"
+            except:
+               return 0,"Nommage impossible"+str(sys.exc_info()[1])
       else :
           old_nom=self.sd.nom
           if string.find(old_nom,'sansnom') :
@@ -334,7 +338,6 @@ class ETAPE(I_MCCOMPO.MCCOMPO):
       """
       try:
          sd=Noyau.N_ETAPE.ETAPE.Build_sd(self,nom)
-         self.state="modified"
       except AsException,e:
          # Une erreur s'est produite lors de la construction du concept
          # Comme on est dans EFICAS, on essaie de poursuivre quand meme