From 1b50b6226f1538be6cd5da6c07bad2b9618ef844 Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Tue, 16 Dec 2008 00:12:03 +0100 Subject: [PATCH] [wiki-lenny] L'autostatus est en utf-8 maintenant darcs-hash:20081215231203-bd074-357b818550e3992bc11835eebd5db9cc0005ae6c.gz --- wiki-lenny/local/macro/HostStatus.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wiki-lenny/local/macro/HostStatus.py b/wiki-lenny/local/macro/HostStatus.py index e0bb5793..c66282d0 100644 --- a/wiki-lenny/local/macro/HostStatus.py +++ b/wiki-lenny/local/macro/HostStatus.py @@ -1,4 +1,4 @@ -# -*- coding: iso-8859-1 -*- +# -*- coding: utf-8 -*- import re from commands import getstatusoutput,getoutput @@ -11,7 +11,7 @@ def execute(macro, text) : f = macro.formatter code = f.table(1) - typlist = ['routes', 'serveurs', 'serveurs de la ferme', 'switches', 'bornes', u'services extérieurs au crans'] + typlist = ['routes', 'serveurs', 'serveurs de la ferme', 'switches', 'bornes', u'services extérieurs au crans'] for typ in typlist: lines = lines [1:] @@ -22,15 +22,15 @@ def execute(macro, text) : line = lines[0].split(' ') trucsdown += f.table_row(1) trucsdown += f.table_cell(1,{'style':'background-color:lightgrey;'}) - trucsdown += unicode(f.text('%s (%s)' % (line [0], getoutput("grep '^%s[^-.a-zA-Z]' /usr/scripts/var/autostatus/hosts | cut -d ' ' -f 5-" % line [0])) ), "iso-8859-15") + trucsdown += unicode(f.text('%s (%s)' % (line [0], getoutput("grep '^%s[^-.a-zA-Z]' /usr/scripts/var/autostatus/hosts | cut -d ' ' -f 5-" % line [0])) ), "utf-8") trucsdown += f.table_cell(0) - # nombre de non réponse au ping + # nombre de non réponse au ping if int(line[1]) > 2 : trucsdown += f.table_cell(1,{'style':'background-color:red;'}) trucsdown += f.text(u'down') else : trucsdown += f.table_cell(1,{'style':'background-color:blue;'}) - trucsdown += f.text(u'état incertain') + trucsdown += f.text(u'état incertain') trucsdown += f.table_cell(0) trucsdown += f.table_row(0) lines = lines [1:]