diff --git a/wiki/macro/HostStatus.py b/wiki/macro/HostStatus.py index 95f028b7..84c0f584 100644 --- a/wiki/macro/HostStatus.py +++ b/wiki/macro/HostStatus.py @@ -20,10 +20,10 @@ def execute(macro, text) : status = getstatusoutput('grep -v " 0 " /etc/autostatus/local.status') if status[0] and status[0] != 256 : - return Cellule('Impossible d\'analyser le fichier de status.','yellow',macro.formatter) + return Cellule(u'Impossible d\'analyser le fichier de status.'.encode('utf-8'),'yellow',macro.formatter) if not status[1].strip() : - return Cellule('Toutes les machines (non down) sont up.','lime',macro.formatter) + return Cellule(u'Toutes les machines (non down) sont up.'.encode('utf-8'),'lime',macro.formatter) lines = status[1].split('\n') @@ -40,10 +40,10 @@ def execute(macro, text) : # nombre de non réponse au ping if int(line[1]) > 2 : code += f.table_cell(1,{'style':'background-color:red'}) - code += f.text('down') + code += f.text(u'down'.encode('utf-8')) else : code += f.table_cell(1,{'style':'background-color:blue'}) - code += f.text('état incertain') + code += f.text(u'état incertain'.encode('utf-8')) code += f.table_cell(0) code += f.table_row(0)