sans commentaire...
darcs-hash:20060401000919-4ec08-d42a37a98865e83a49f0d5504bf36f5d6d104d15.gz
This commit is contained in:
parent
72f0fe6860
commit
fcd1c61fc2
1 changed files with 15 additions and 23 deletions
|
@ -279,30 +279,22 @@ class fichier_impression:
|
|||
parse = ligne.split("=")
|
||||
if parse[1] == 'None':
|
||||
setattr(self,parse[0],None)
|
||||
else:
|
||||
elif parse[0] in ("nom_job", "taille", "user", "nom_fichier_pdf", "nom_fichier_desc", "job_id"):
|
||||
#pour les attributs strings
|
||||
if parse[0] in ("nom_job", "taille", "user",
|
||||
"nom_fichier_pdf", "nom_fichier_desc",
|
||||
"job_id"):
|
||||
setattr(self,parse[0],parse[1])
|
||||
else:
|
||||
elif parse[0] in ("nbr_pages", "nb_copie", "imprime", "code","agrafe"):
|
||||
#pour les attributs entiers
|
||||
if parse[0] in ("nbr_pages", "nb_copie",
|
||||
"imprime", "code","agrafe"):
|
||||
setattr(self,parse[0],int(parse[1]))
|
||||
else:
|
||||
elif parse[0] in ("recto_verso", "transparent", "couleur", "portrait", "erreur_critique"):
|
||||
#pour les attributs boolean
|
||||
if parse[0] in ("recto_verso", "transparent",
|
||||
"couleur", "portrait",
|
||||
"erreur_critique"):
|
||||
setattr(self,parse[0],(parse[1] == 'True'))
|
||||
else:
|
||||
elif parse[0] in ("cout", "modif_epoch"):
|
||||
#pour les attributs flottants
|
||||
if parse[0] in ("cout", "modif_epoch"):
|
||||
setattr(self, parse[0], float(parse[1]))
|
||||
else:
|
||||
self.erreur_critique = True
|
||||
print '<p>ligne non parsée: %s</p>' % ligne
|
||||
|
||||
ligne=file_obj_desc.readline()[0:-1]
|
||||
file_obj_desc.close()
|
||||
except Exception, inst :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue