~lazr-developers/lazr.restful/oops-fix

« back to all changes in this revision

Viewing changes to src/lazr/restful/example/wsgi/run.py

  • Committer: Leonard Richardson
  • Date: 2009-09-03 20:06:02 UTC
  • mfrom: (66.2.23 grok)
  • Revision ID: leonard.richardson@canonical.com-20090903200602-i80ltc64kyxnax33
[r=cprov] Simplified the WSGI application object.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
 
from lazr.restful.wsgi import application_factory
3
 
from lazr.restful.example.wsgi.root import WSGIExampleWebServiceRootResource
 
2
from lazr.restful.wsgi import WSGIApplication
4
3
 
5
4
if __name__ == '__main__':
6
5
    import sys
7
6
    host, port = sys.argv[1:3]
8
 
    application = application_factory(
9
 
        'WSGIExampleWebServiceApplication', WSGIExampleWebServiceRootResource)
10
 
    server = application.make_server(
 
7
    server = WSGIApplication.make_server(
11
8
        host, port, 'lazr.restful.example.wsgi')
12
9
    server.handle_request()