logs des erreurs
darcs-hash:20061025193809-f46e9-9de01e8a073786f0f432532b9fc114d7ce639908.gz
This commit is contained in:
parent
c6cfa5b506
commit
bc0893bd51
1 changed files with 6 additions and 9 deletions
|
@ -11,13 +11,11 @@ class FileError(Exception):
|
|||
|
||||
class root:
|
||||
|
||||
|
||||
##########################
|
||||
# affichage
|
||||
##########################
|
||||
#
|
||||
# methode qui affiche la template avec toutes les infos de
|
||||
# l'adherent + les formulaires
|
||||
# template principale
|
||||
#
|
||||
def index(self, submit = None, fileList = None, newFile = None ):
|
||||
data = {}
|
||||
|
@ -39,7 +37,7 @@ class root:
|
|||
data['etatImprimante'] = "<br />".join(crans.impression.etat_imprimante.etat())
|
||||
except Exception, e:
|
||||
data['etatImprimante'] = 'Imprimante hors ligne'
|
||||
data['Erreur_imprimante'] = str(e)
|
||||
data['Erreur_imprimante'] = str(e).replace("\"", "\\\"")
|
||||
return {'template':'impression',
|
||||
'values':data,
|
||||
'stylesheets':['impression.css'],
|
||||
|
@ -54,6 +52,7 @@ class root:
|
|||
cherrypy.session['impression'] = crans.impression.impression(filepath, cherrypy.session['uid'])
|
||||
return {'nbPages': cherrypy.session['impression'].pages()}
|
||||
except Exception, e:
|
||||
cherrypy.log("useFile (erreur): %s" % str(e), 'IMPRESSION', 1)
|
||||
return {'erreur':str(e) }
|
||||
useFile.exposed= True
|
||||
|
||||
|
@ -63,6 +62,7 @@ class root:
|
|||
try:
|
||||
nouvPrix = cherrypy.session['impression'].changeSettings(papier=papier, couleurs=couleurs, agraphes=agrafes, recto_verso=recto_verso, copies=int(copies))
|
||||
except Exception, e:
|
||||
cherrypy.log("changeSettings (erreur): %s" % str(e), 'IMPRESSION', 1)
|
||||
return {"erreur":str(e)}
|
||||
return {'nouvPrix':nouvPrix}
|
||||
changeSettings.exposed = True
|
||||
|
@ -74,6 +74,7 @@ class root:
|
|||
except crans.impression.SoldeInsuffisant:
|
||||
return {"SoldeInsuffisant":1}
|
||||
except Exception, e:
|
||||
cherrypy.log("lancerImpression (erreur): %s" % str(e), 'IMPRESSION', 1)
|
||||
return {"erreur":str(e)}
|
||||
return {'code':str(crans.impression.digicode.gen_code("Impression intranet : " + cherrypy.session['uid'])) + "#"}
|
||||
lancerImpression.exposed = True
|
||||
|
@ -105,14 +106,10 @@ class root:
|
|||
os.makedirs(file_folder)
|
||||
newFilePath = os.path.join(file_folder, aFile.filename)
|
||||
shutil.move(tempFileName, newFilePath)
|
||||
|
||||
cherrypy.log("New file uploaded at : %s" % newFilePath, "IMPRESSION")
|
||||
return newFilePath
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##########################
|
||||
# devis
|
||||
##########################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue