Acrobatie pour ignorer le dcompte des pages restantes.
darcs-hash:20070223222052-68412-2969da806d5c774821355f3dc856f17ca39412c1.gz
This commit is contained in:
parent
78ee6db177
commit
ce7a4cc4c7
1 changed files with 10 additions and 1 deletions
|
@ -23,6 +23,7 @@ dico = {
|
||||||
"JAUNE": 0,
|
"JAUNE": 0,
|
||||||
"NOIR": 0,
|
"NOIR": 0,
|
||||||
'COMM TAMB. NOIR': 0,
|
'COMM TAMB. NOIR': 0,
|
||||||
|
'PAGES REST.': 0,
|
||||||
"": 0,
|
"": 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +34,15 @@ def etat():
|
||||||
try:
|
try:
|
||||||
comm = hptools.snmp(host="laserjet.adm.crans.org", version="1", community="public")
|
comm = hptools.snmp(host="laserjet.adm.crans.org", version="1", community="public")
|
||||||
for oid in liste_oid:
|
for oid in liste_oid:
|
||||||
total += dico.get(comm.get_string(oid), 4)
|
msg = comm.get_string(oid)
|
||||||
|
diff = dico.get(msg, None)
|
||||||
|
if diff == None:
|
||||||
|
for k in dico.keys():
|
||||||
|
if k in msg and k != "": diff = dico[k]
|
||||||
|
if diff == None:
|
||||||
|
diff = 4
|
||||||
|
total += diff
|
||||||
|
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
total += 24
|
total += 24
|
||||||
return total
|
return total
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue