Mise jour des tats possibles de l'imprimante.
darcs-hash:20061004072927-68412-da2a2b37bfe713eadabedce179a21b57dba42faa.gz
This commit is contained in:
parent
f43636e8ee
commit
9b4b31be68
1 changed files with 9 additions and 3 deletions
|
@ -7,8 +7,14 @@ sys.path.append("/usr/scripts/gestion")
|
||||||
import hptools
|
import hptools
|
||||||
|
|
||||||
dico = {
|
dico = {
|
||||||
"PrÁt": u"Prêt",
|
u"PrÁt": u"Prêt",
|
||||||
"Pr menus, appuy \x1e": u"",
|
u"Pr menus, appuy \x1e": u"",
|
||||||
|
u"Powersave activÅ": u"En veille",
|
||||||
|
u"Verification": u"Vérification imprimante",
|
||||||
|
u"imprimante": u"",
|
||||||
|
u"PrÅchauffage": u"Préchauffage",
|
||||||
|
u"Traitement de la": u"Impression en cours",
|
||||||
|
u"tÀche du bac 4": u"",
|
||||||
}
|
}
|
||||||
|
|
||||||
def etat():
|
def etat():
|
||||||
|
@ -18,7 +24,7 @@ def etat():
|
||||||
comm = hptools.snmp(host="laserjet.adm.crans.org",version="1",community="public")
|
comm = hptools.snmp(host="laserjet.adm.crans.org",version="1",community="public")
|
||||||
liste_msg = []
|
liste_msg = []
|
||||||
for oid in liste_oid:
|
for oid in liste_oid:
|
||||||
msg = comm.get_string(oid)
|
msg = comm.get_string(oid).decode("ISO-8859-1")
|
||||||
msg = dico.get(msg, msg).encode("ISO-8859-1")
|
msg = dico.get(msg, msg).encode("ISO-8859-1")
|
||||||
if msg: liste_msg.append(msg)
|
if msg: liste_msg.append(msg)
|
||||||
except Exception,err:
|
except Exception,err:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue