~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/main.py

  • Committer: Matt Nordhoff
  • Date: 2010-01-14 00:20:24 UTC
  • mfrom: (399.1.3 loggerhead)
  • Revision ID: mnordhoff@mattnordhoff.com-20100114002024-w9wojo0hu8tg1j2q
Don't build a branch's revision graph cache more than once at the same time. (Max Kanat-Alexander)

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
    else:
152
152
        host = config.get_option('user_host')
153
153
 
154
 
    httpserver.serve(app, host=host, port=port)
 
154
    if not config.get_option('protocol'):
 
155
        protocol = 'http'
 
156
    else:
 
157
        protocol = config.get_option('protocol')
 
158
 
 
159
    if protocol == 'http':
 
160
        httpserver.serve(app, host=host, port=port)
 
161
    else:
 
162
        if protocol == 'fcgi':
 
163
            from flup.server.fcgi import WSGIServer
 
164
        elif protocol == 'scgi':
 
165
            from flup.server.scgi import WSGIServer
 
166
        elif protocol == 'ajp':
 
167
            from flup.server.ajp import WSGIServer
 
168
        else:
 
169
            print 'Unknown protocol: %s.' % (protocol)
 
170
            sys.exit(1)
 
171
        WSGIServer(app, bindAddress=(host, int(port))).run()