Faut envoyer de l'UTF-8...
darcs-hash:20051008091653-d1718-492b7478afa5b4352905c2710d40dc97470009f2.gz
This commit is contained in:
parent
6fa3244151
commit
2b5081ff7a
1 changed files with 4 additions and 4 deletions
|
@ -20,10 +20,10 @@ def execute(macro, text) :
|
||||||
status = getstatusoutput('grep -v " 0 " /etc/autostatus/local.status')
|
status = getstatusoutput('grep -v " 0 " /etc/autostatus/local.status')
|
||||||
|
|
||||||
if status[0] and status[0] != 256 :
|
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() :
|
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')
|
lines = status[1].split('\n')
|
||||||
|
|
||||||
|
@ -40,10 +40,10 @@ def execute(macro, text) :
|
||||||
# nombre de non réponse au ping
|
# nombre de non réponse au ping
|
||||||
if int(line[1]) > 2 :
|
if int(line[1]) > 2 :
|
||||||
code += f.table_cell(1,{'style':'background-color:red'})
|
code += f.table_cell(1,{'style':'background-color:red'})
|
||||||
code += f.text('down')
|
code += f.text(u'down'.encode('utf-8'))
|
||||||
else :
|
else :
|
||||||
code += f.table_cell(1,{'style':'background-color:blue'})
|
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_cell(0)
|
||||||
code += f.table_row(0)
|
code += f.table_row(0)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue