2
# -*- coding: utf-8 -*-
4
# Copyright (C) 2003-2008 Edgewall Software
5
# Copyright (C) 2003-2004 Jonas Borgström <jonas@edgewall.com>
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.
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/.
16
# Author: Jonas Borgström <jonas@edgewall.com>
21
if 'TRAC_ENV' not in os.environ and \
22
'TRAC_ENV_PARENT_DIR' not in os.environ:
23
os.environ['TRAC_ENV'] = '${env.path}'
24
if 'PYTHON_EGG_CACHE' not in os.environ:
25
os.environ['PYTHON_EGG_CACHE'] = tempfile.gettempdir()
26
from trac.web import cgi_frontend
35
traceback.print_exc(file=sys.stderr)
37
print 'Status: 500 Internal Server Error'
38
print 'Content-Type: text/plain'
42
print 'Trac detected an internal error:', e
44
traceback.print_exc(file=sys.stdout)