[wiki/{bornes.py,status.py}] Mise a jour pour les nouvelles bornes
Bon, il y a probablement des couacs, et j'ai peut-etre casse d'autres trucs, mais au moins status.xml est bon ... darcs-hash:20090922192037-ddb99-ab3956ec60f23429c5f854828c66e8bb40990513.gz
This commit is contained in:
parent
34787874db
commit
20a4dfd6eb
2 changed files with 71 additions and 6 deletions
|
@ -9,9 +9,7 @@ import time
|
|||
sys.path.append("/usr/scripts/gestion")
|
||||
sys.path.append("/usr/scripts/wifi")
|
||||
|
||||
from canal_bornes import bornes_canal
|
||||
from wifi_clients import bornes_clients
|
||||
from uptime_bornes import bornes_uptime
|
||||
from bornes import bornes_canal, bornes_clients, bornes_uptime
|
||||
|
||||
from ldap_crans import crans_ldap
|
||||
l = crans_ldap()
|
||||
|
@ -65,12 +63,12 @@ for b in bornes:
|
|||
# Certains résultats (ragnarok) n'ont pas tous les champs.
|
||||
if (canaux.has_key(nom)):
|
||||
xml_canal=status.createElement(u"canal")
|
||||
xml_canal.appendChild(status.createTextNode(unicode(int(canaux[nom]))))
|
||||
xml_canal.appendChild(status.createTextNode(unicode(int('0' + canaux[nom]))))
|
||||
xml_borne.appendChild(xml_canal)
|
||||
|
||||
if (clients.has_key(nom)):
|
||||
xml_clients=status.createElement(u"clients")
|
||||
xml_clients.appendChild(status.createTextNode(unicode(int(clients[nom]))))
|
||||
xml_clients.appendChild(status.createTextNode(unicode(int('0' + clients[nom]))))
|
||||
xml_borne.appendChild(xml_clients)
|
||||
|
||||
if (uptimes.has_key(nom)):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue