~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to start-loggerhead

  • Committer: Martin Albisetti
  • Date: 2008-11-20 16:55:47 UTC
  • Revision ID: argentina@gmail.com-20081120165547-q0pwoo1x1rfhqkpn
Fixed setup to install YUI

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# along with this program; if not, write to the Free Software
14
14
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
15
15
 
16
 
"""
17
 
WARNING! This script has been deprecated and will go away soon!
18
 
A script for starting the loggerhead process.
19
 
"""
 
16
"""A script for starting the loggerhead process."""
20
17
 
21
18
 
22
19
import logging
26
23
import sys
27
24
import urlparse
28
25
 
29
 
from bzrlib.plugin import load_plugins
30
 
from bzrlib.util.configobj.configobj import ConfigObj
 
26
from configobj import ConfigObj
31
27
 
32
28
from paste import httpserver
33
29
from paste.httpexceptions import make_middleware
40
36
 
41
37
 
42
38
def main():
43
 
    sys.stderr.write('\n\n')
44
 
    sys.stderr.write('WARNING!!! This script has been deprecated by '
45
 
                     'serve-branches, and will be removed in the next '
46
 
                     'release. Please migrate to serve-branches and report '
47
 
                     'any missing features.\n')
48
 
    sys.stderr.write('\n\n')
49
 
 
50
39
    home = os.path.realpath(os.path.dirname(__file__))
51
40
    default_pidfile = os.path.join(home, 'loggerhead.pid')
52
41
    default_configfile = os.path.join(home, 'loggerhead.conf')
126
115
        def app(environ, start_response, orig=app):
127
116
            environ['SCRIPT_NAME'] = path
128
117
            environ['HTTP_HOST'] = netloc
129
 
            environ['wsgi.url_scheme'] = scheme
130
118
            return orig(environ, start_response)
131
119
 
132
 
    load_plugins()
133
 
 
134
120
    try:
135
121
        httpserver.serve(
136
122
            app, host=server_host, port=server_port,