X-Git-Url: https://git.immae.eu/?p=perso%2FDenise%2Foms.git;a=blobdiff_plain;f=gestion_donnees.py;h=9584386714750d2a9c77ad321473a7287414df72;hp=2177fc8ae9e3f8c3f26b375c40aab5ae84860d78;hb=66a3e38cc085dc000776d3e2ad3acd7ef57068a3;hpb=d38793f9260c1ca8b96a049d04cc801413c8fb0e diff --git a/gestion_donnees.py b/gestion_donnees.py index 2177fc8..9584386 100644 --- a/gestion_donnees.py +++ b/gestion_donnees.py @@ -53,7 +53,7 @@ def convertit_age_vers_texte(nombre): annees = int(nombre / jours_dans_annee) restant = nombre - round(annees*jours_dans_annee) mois = int(restant/jours_dans_mois) - jours= restant - round(mois*jours_dans_mois) + jours= nombre - round(mois*jours_dans_mois + annees*jours_dans_annee) chaine = "" if annees >0: @@ -73,12 +73,12 @@ def convertit_poids_vers_python(chaine,liste_err): chaine2 = chaine2.replace(" ","") try: - poids = float(chaine) + poids = float(chaine2) except: warning("Poids impossible à lire : "+chaine,liste_err) poids = 0 - if not( 0