~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to serve-branches

  • Committer: Colin Watson
  • Date: 2009-02-26 18:10:29 UTC
  • mto: This revision was merged to the branch mainline in revision 280.
  • Revision ID: cjwatson@canonical.com-20090226181029-52nbetyrz4b4suk1
Leading blank lines in commit messages no longer result in an empty summary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from optparse import OptionParser
23
23
 
 
24
from bzrlib.plugin import load_plugins
 
25
 
24
26
from paste import httpserver
25
27
from paste.httpexceptions import HTTPExceptionHandler, HTTPInternalServerError
26
28
from paste.translogger import TransLogger
125
127
        prefix = '/'
126
128
    else:
127
129
        prefix = options.user_prefix
 
130
        if not prefix.startswith('/'):
 
131
            prefix = '/' + prefix
128
132
 
129
133
    try:
130
134
        from paste.deploy.config import PrefixMiddleware
144
148
    else:
145
149
        app = PrefixMiddleware(app, prefix=prefix)
146
150
 
 
151
    app = HTTPExceptionHandler(app)
147
152
    app = ErrorHandlerApp(app)
148
 
    app = HTTPExceptionHandler(app)
149
153
 
150
154
    if not options.user_port:
151
155
        port = '8080'
157
161
    else:
158
162
        host = options.user_host
159
163
 
 
164
    load_plugins()
 
165
 
160
166
    httpserver.serve(app, host=host, port=port)
161
167
 
162
168