Salome HOME
ajout des unites. pas sur d avoir tout pousse
[tools/eficas.git] / Noyau / N_SIMP.py
index 80f2d0c78b4fec7b7674ae2ec1b2b78765846fc2..fdc3148dfd569bc2cc7068b87c9784691124619b 100644 (file)
@@ -51,7 +51,7 @@ class SIMP(N_ENTITE.ENTITE):
                  min=1, max=1, homo=1, position='local',filtre=None,
                  val_min=float('-inf'), val_max=float('inf'), docu="", validators=None, nomXML=None,
                  sug=None,fenetreIhm=None, attribut=False,  sortie='n', intoXML=None, metAJour=None,
-                 avecBlancs=False):
+                 avecBlancs=False, unite=None):
         """
             Un mot-clé simple est caractérisé par les attributs suivants :
             - type : cet attribut est obligatoire et indique le type de valeur attendue
@@ -127,14 +127,15 @@ class SIMP(N_ENTITE.ENTITE):
         self.sortie     = sortie
         self.filtre     = filtre
         self.avecBlancs = avecBlancs
+        self.unite      = unite
         if not(self.avecBlancs) and self.max > 1 and 'TXM' in self.type and self.into != None :
             for val in self.into :
-                if val.find(' ') : 
+                if val.find(' ')  > -1
                    self.avecBlancs = True  
                    break
-        if not(self.avecBlancs) and self.max > 1 and 'TXM' in self.type and self.into != None :
+        if not(self.avecBlancs) and self.max > 1 and 'TXM' in self.type and self.intoXML != None :
             for val in self.intoXML :
-                if val.find(' ') : 
+                if val.find(' ')  > -1
                    self.avecBlancs = True  
                    break
         if self.avecBlancs and not ('TXM' in self.type) :