From 81485c85d2dc3c804dbb20a9c4f31354d9cc2437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Thu, 19 Jun 2014 10:16:18 +0200 Subject: [PATCH] =?UTF-8?q?[analyse]=20On=20agrandit=20la=20largeur=20du?= =?UTF-8?q?=20tableau=20dans=20le=20fichier=20g=C3=A9n=C3=A9r=C3=A9=20par?= =?UTF-8?q?=20le=20cron.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Et le mail n'était pas assez précis. --- gestion/config/mails/upload.py | 2 +- surveillance/analyse2.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gestion/config/mails/upload.py b/gestion/config/mails/upload.py index 6ab48ffc..4be66964 100644 --- a/gestion/config/mails/upload.py +++ b/gestion/config/mails/upload.py @@ -30,7 +30,7 @@ Ses machines ont été aperçues pour la dernière fois à ces endroits : La chambre de l'adhérent est %(chambre)s. -analyse.py devrait bientôt avoir généré un fichier que vous pourrez lui envoyer en cas de demande. Le fichier sera dans le dossier /usr/scripts/var/. +analyse.py devrait bientôt avoir généré un fichier que vous pourrez lui envoyer en cas de demande. Le fichier sera dans le dossier /usr/scripts/var/analyse/. --\u0020 Message créé par deconnexion.py diff --git a/surveillance/analyse2.py b/surveillance/analyse2.py index e01861b6..e1f292d8 100755 --- a/surveillance/analyse2.py +++ b/surveillance/analyse2.py @@ -399,7 +399,7 @@ GROUP BY longueur = [17, '*', '*', 10, 8, 14, 14] format = ('s', 's', 's', 's', 's', 'o', 'o') data = [[unicode(ligne['mac']), unicode(convert(ligne['ip_crans'])), unicode(convert(ligne['ip_ext'])), unicode(ligne['port_crans']), unicode(ligne['port_ext']), unicode(ligne["tot_download"]), unicode(ligne["tot_upload"])] for ligne in stats] - final_data = affichage.tableau(data, titre=entete, largeur=longueur, styles=styles, format=format) + final_data = affichage.tableau(data, titre=entete, largeur=longueur, styles=styles, format=format, width=120) output += u"Upload total : %s Mio, download total : %s Mio\n" % (sum([int(ligne["tot_upload"]) for ligne in stats])/1024/1024, sum([int(ligne["tot_download"]) for ligne in stats])/1024/1024) output += final_data