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:]