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