CVS: tmda-cgi tmda-cgi.py,1.32,1.33
Gre7g Luterman <[email protected]>
| Newsgroups | gmane.mail.spam.tmda.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/tmda/tmda-cgi In directory sc8-pr-cvs1:/tmp/cvs-serv17398 Modified Files: tmda-cgi.py Log Message: Re-arranged some stuff so that the traceback code will catch exceptions thrown very early on in the code. Index: tmda-cgi.py =================================================================== RCS file: /cvsroot/tmda/tmda-cgi/tmda-cgi.py,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- tmda-cgi.py 13 May 2003 16:12:36 -0000 1.32 +++ tmda-cgi.py 13 May 2003 16:37:05 -0000 1.33 @@ -21,11 +21,18 @@ "Web interface to TMDA tools." +# Prepare the traceback in case of uncaught exception +import os +import sys import MyCgiTb +import Template +MyCgiTb.ErrTemplate = "prog_err2.html" +Template.Template.Dict["ThemeDir"] = "%s/themes/Blue" % \ + os.environ["TMDA_CGI_DISP_DIR"] +Template.Template.BaseDir = "%s/display/themes/Blue/template" % \ + os.path.abspath(os.path.split(sys.argv[0])[0]) import cgi -import os -import sys # Pick up the TMDA and TMDA/pythonlib directories to get any overrides of # standard modules and packages. Note that these must go at the very front of @@ -38,8 +45,6 @@ import CharSetAlias import CgiUtil import Session -import Template - def Call(Library, Str = None): "Launch a library with the appropriate globals." Library.Form = Form @@ -52,17 +57,10 @@ # Capture WebUID Session.WebUID = os.getuid() -# Prepare the traceback in case of uncaught exception -MyCgiTb.ErrTemplate = "prog_err2.html" - # Make some global stuff available to all -Template.Template.BaseDir = "%s/display/themes/Blue/template" % \ - os.path.abspath(os.path.split(sys.argv[0])[0]) Template.Template.Dict["Script"] = os.environ["SCRIPT_NAME"] Template.Template.Dict["SID"] = "" Template.Template.Dict["DispDir"] = os.environ["TMDA_CGI_DISP_DIR"] -Template.Template.Dict["ThemeDir"] = "%s/themes/Blue" % \ - os.environ["TMDA_CGI_DISP_DIR"] Template.Template.Dict["ErrMsg"] = "No error message returned. Sorry!" # Check version information _______________________________________ tmda-cvs mailing list http://tmda.net/lists/listinfo/tmda-cvs