diff options
Diffstat (limited to 'gestion_donnees.py')
-rw-r--r-- | gestion_donnees.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gestion_donnees.py b/gestion_donnees.py index 82491ca..9584386 100644 --- a/gestion_donnees.py +++ b/gestion_donnees.py | |||
@@ -73,12 +73,12 @@ def convertit_poids_vers_python(chaine,liste_err): | |||
73 | chaine2 = chaine2.replace(" ","") | 73 | chaine2 = chaine2.replace(" ","") |
74 | 74 | ||
75 | try: | 75 | try: |
76 | poids = float(chaine) | 76 | poids = float(chaine2) |
77 | except: | 77 | except: |
78 | warning("Poids impossible à lire : "+chaine,liste_err) | 78 | warning("Poids impossible à lire : "+chaine,liste_err) |
79 | poids = 0 | 79 | poids = 0 |
80 | if not( 0<poids<poids_maxi): | 80 | if not( 0<=poids<poids_maxi): |
81 | warning("Poids incohérent : "+poids) | 81 | warning("Poids incohérent : "+str(poids),liste_err) |
82 | poids = 0 | 82 | poids = 0 |
83 | return poids | 83 | return poids |
84 | 84 | ||
@@ -321,4 +321,4 @@ def fichier_texte_vers_configdonnees(fichier,liste_err): | |||
321 | #le nb max du formulaire | 321 | #le nb max du formulaire |
322 | valform["nb_data"] = indice_formulaire +2 | 322 | valform["nb_data"] = indice_formulaire +2 |
323 | 323 | ||
324 | return valform \ No newline at end of file | 324 | return valform |