correction du bug de login (j'espre)

darcs-hash:20061117140933-f46e9-af7e3b0bf4126861a3e9f9c1eb09227c3c6535c7.gz
This commit is contained in:
gdetrez 2006-11-17 15:09:33 +01:00
parent b488b68dcf
commit 4f3b212b2d
6 changed files with 80 additions and 86 deletions

View file

@ -19,6 +19,7 @@ class root:
#
def index(self, submit = None, fileList = None, newFile = None ):
data = {}
# on efface un eventuel objet impression existant
cherrypy.session['impression'] = None
if submit == "Envoyer":
try:
@ -108,7 +109,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)
cherrypy.log("changeSettings : %s" % str(e), 'IMPRESSION', 1)
return {"erreur":str(e)}
return {'nouvPrix':nouvPrix}
changeSettings.exposed = True
@ -123,7 +124,7 @@ class root:
except crans.impression.SoldeInsuffisant:
return {"SoldeInsuffisant":1}
except Exception, e:
cherrypy.log("lancerImpression (erreur): %s" % str(e), 'IMPRESSION', 1)
cherrypy.log("lancerImpression : %s" % str(e), 'IMPRESSION', 1)
return {"erreur":str(e)}
cherrypy.log("impression", 'IMPRESSION')
return {'code':str(crans.impression.digicode.gen_code(cherrypy.session['uid'])) + "#"}