#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2003-2008 Edgewall Software # Copyright (C) 2003-2004 Jonas Borgström # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consists of voluntary contributions made by many # individuals. For the exact contribution history, see the revision # history and logs, available at http://trac.edgewall.org/log/. # # Author: Jonas Borgström try: import os import tempfile if 'TRAC_ENV' not in os.environ and \ 'TRAC_ENV_PARENT_DIR' not in os.environ: os.environ['TRAC_ENV'] = '/srv/caca.zoy.org/var/lib/trac-test' if 'PYTHON_EGG_CACHE' not in os.environ: os.environ['PYTHON_EGG_CACHE'] = tempfile.gettempdir() from trac.web import fcgi_frontend fcgi_frontend.run() except SystemExit: raise except Exception, e: print 'Content-Type: text/plain\r\n\r\n', print 'Oops...' print print 'Trac detected an internal error:' print print e print import traceback import StringIO tb = StringIO.StringIO() traceback.print_exc(file=tb) print tb.getvalue()