correction de bugs + envoie systématique de mails en cas d'erreur
darcs-hash:20061202222324-f46e9-2793a0a4b96eea2b3b78b8c15d7eba43d3796371.gz
This commit is contained in:
parent
122619c021
commit
3a815055b1
3 changed files with 80 additions and 2 deletions
|
@ -1,5 +1,29 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- coding: iso-8859-15 -*-
|
||||
# #############################################################
|
||||
# ..
|
||||
# .... ............ ........
|
||||
# . ....... . .... ..
|
||||
# . ... .. .. .. .. ..... . ..
|
||||
# .. .. ....@@@. .. . ........ .
|
||||
# .. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. ....
|
||||
# .@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... ....
|
||||
# @@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. ..
|
||||
# .@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. .....
|
||||
# ...@@@.... @@@ .@@.......... ........ ..... ..
|
||||
# . ..@@@@.. . .@@@@. .. ....... . .............
|
||||
# . .. .... .. .. . ... ....
|
||||
# . . .... ............. .. ...
|
||||
# .. .. ... ........ ... ...
|
||||
# ................................
|
||||
#
|
||||
# #############################################################
|
||||
# __init__.py
|
||||
#
|
||||
# Classe impression
|
||||
#
|
||||
# Copyright (c) 2006 by www.crans.org
|
||||
# #############################################################
|
||||
|
||||
|
||||
import cherrypy, sys, os, datetime
|
||||
|
@ -117,6 +141,28 @@ Ceci est un rapport de bug envoye depuis l'intranet.
|
|||
|
||||
%s
|
||||
""" % "\n".join( [ "%s: %s" % (str(a), str(kw[a])) for a in kw] )
|
||||
text += "\n= Cherrypy vars =\n"
|
||||
try:
|
||||
text += "url: %s\n" % cherrypy.request.browser_url
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
text += "headers: \n %s\n" % "\n".join( [" %s: %s" % (str(a), str(cherrypy.request.headers[a])) for a in cherrypy.request.headers] )
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
text += "request_line: %s\n" % cherrypy.request.request_line
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
text += "query_string: %s\n" % cherrypy.request.query_string
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
text += "path: %s\n" % cherrypy.request.path
|
||||
except:
|
||||
pass
|
||||
|
||||
quickSend(exp, dest, subject, text)
|
||||
return self.index()
|
||||
|
||||
|
@ -145,9 +191,12 @@ Ceci est un rapport de bug envoye depuis l'intranet.
|
|||
'standalone':False,
|
||||
}
|
||||
elif status==500:
|
||||
self.send_error_repport(status = status, message = message )
|
||||
# les filtres ne sont pas appliqués, on le fait à la main...
|
||||
from plugins.templatesfilter import TemplatesFilter
|
||||
TemplatesFilter().goWithThisDict({'template':'error', 'values':{'status':status, 'message':message }})
|
||||
else:
|
||||
self.send_error_repport(status = status, message = message)
|
||||
cherrypy._cputil._cp_on_http_error(status, message)
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,30 @@
|
|||
#! /usr/bin/env python
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: iso-8859-15 -*-
|
||||
# #############################################################
|
||||
# ..
|
||||
# .... ............ ........
|
||||
# . ....... . .... ..
|
||||
# . ... .. .. .. .. ..... . ..
|
||||
# .. .. ....@@@. .. . ........ .
|
||||
# .. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. ....
|
||||
# .@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... ....
|
||||
# @@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. ..
|
||||
# .@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. .....
|
||||
# ...@@@.... @@@ .@@.......... ........ ..... ..
|
||||
# . ..@@@@.. . .@@@@. .. ....... . .............
|
||||
# . .. .... .. .. . ... ....
|
||||
# . . .... ............. .. ...
|
||||
# .. .. ... ........ ... ...
|
||||
# ................................
|
||||
#
|
||||
# #############################################################
|
||||
# impression.py
|
||||
#
|
||||
# interface d'impression
|
||||
#
|
||||
# Copyright (c) 2006 by www.crans.org
|
||||
# #############################################################
|
||||
|
||||
import cherrypy, tempfile, shutil, os
|
||||
import crans.impression
|
||||
import crans.impression.digicode
|
||||
|
|
|
@ -80,3 +80,6 @@ div#addCodeBox form button {
|
|||
margin:3px;
|
||||
}
|
||||
|
||||
form input.textinput {
|
||||
border: thin gray solid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue