~unity-2d-team/unity-2d/Shell-MultiMonitor

« back to all changes in this revision

Viewing changes to grackle/service.py

  • Committer: Curtis Hovey
  • Date: 2012-03-17 21:36:11 UTC
  • mto: This revision was merged to the branch mainline in revision 45.
  • Revision ID: curtis.hovey@canonical.com-20120317213611-9r5y3wa9dzoonczv
Clean up python-oddities.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
__metaclass__ = type
 
2
__all__ = [
 
3
    'ForkedFakeService',
 
4
    'GrackleService',
 
5
    ]
2
6
 
3
7
import httplib
4
8
import logging
14
18
 
15
19
 
16
20
class GrackleService:
17
 
    """A request handler that forwards to server.store."""
 
21
    """A request handler that forwards to an archive store."""
18
22
 
19
23
    def __init__(self, store):
20
24
        self.store = store
171
175
        os.kill(self.pid, SIGKILL)
172
176
 
173
177
 
174
 
def application(environ, start_response):
175
 
    start_response('200 OK', [('Content-Type', 'text/plain')])
176
 
    return "Hello World"
177
 
 
178
 
 
179
178
if __name__ == '__main__':
180
179
    app = GrackleService(MemoryStore({}))
181
180
    service = make_server('', 8787, app)