Last change
on this file since 3324 was
2834,
checked in by Sam Hocevar, 15 years ago
|
Change the website name to caca.zoy.org.
|
-
Property svn:executable set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/usr/bin/python |
---|
2 | # -*- coding: utf-8 -*- |
---|
3 | # |
---|
4 | # Copyright (C) 2003-2008 Edgewall Software |
---|
5 | # Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com> |
---|
6 | # All rights reserved. |
---|
7 | # |
---|
8 | # This software is licensed as described in the file COPYING, which |
---|
9 | # you should have received as part of this distribution. The terms |
---|
10 | # are also available at http://trac.edgewall.org/wiki/TracLicense. |
---|
11 | # |
---|
12 | # This software consists of voluntary contributions made by many |
---|
13 | # individuals. For the exact contribution history, see the revision |
---|
14 | # history and logs, available at http://trac.edgewall.org/log/. |
---|
15 | # |
---|
16 | # Author: Jonas Borgström <jonas@edgewall.com> |
---|
17 | |
---|
18 | try: |
---|
19 | import os |
---|
20 | import tempfile |
---|
21 | if 'TRAC_ENV' not in os.environ and \ |
---|
22 | 'TRAC_ENV_PARENT_DIR' not in os.environ: |
---|
23 | os.environ['TRAC_ENV'] = '/srv/caca.zoy.org/var/lib/trac' |
---|
24 | if 'PYTHON_EGG_CACHE' not in os.environ: |
---|
25 | os.environ['PYTHON_EGG_CACHE'] = tempfile.gettempdir() |
---|
26 | from trac.web import cgi_frontend |
---|
27 | cgi_frontend.run() |
---|
28 | except SystemExit: |
---|
29 | raise |
---|
30 | except Exception, e: |
---|
31 | import sys |
---|
32 | import traceback |
---|
33 | |
---|
34 | print>>sys.stderr, e |
---|
35 | traceback.print_exc(file=sys.stderr) |
---|
36 | |
---|
37 | print 'Status: 500 Internal Server Error' |
---|
38 | print 'Content-Type: text/plain' |
---|
39 | print |
---|
40 | print 'Oops...' |
---|
41 | print |
---|
42 | print 'Trac detected an internal error:', e |
---|
43 | print |
---|
44 | traceback.print_exc(file=sys.stdout) |
---|
Note: See
TracBrowser
for help on using the repository browser.