~ubuntu-branches/ubuntu/jaunty/trac/jaunty

« back to all changes in this revision

Viewing changes to trac/admin/templates/deploy_trac.cgi

  • Committer: Bazaar Package Importer
  • Author(s): Luis Matos
  • Date: 2008-07-13 23:46:20 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20080713234620-13ynpdpkbaymfg1z
Tags: 0.11-2
* Re-added python-setup-tools to build dependences. Closes: #490320 #468705
* New upstream release Closes: 489727
* Added sugestion for other vcs support available: git bazaar mercurial 
* Added spamfilter plugin to sugests
* Moved packaging from python-support to python-central
* Added an entry to the NEWS about the cgi Closes: #490275
* Updated 10_remove_trac_suffix_from_title patch to be used in 0.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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'] = '${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
 
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)