MCPcopy Create free account
hub / github.com/Hieromon/AutoConnect / UpdateHttpServer

Class UpdateHttpServer

src/updateserver/python2/updateserver.py:22–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21
22class UpdateHttpServer(object):
23 def __init__(self, port, bind, catalog_dir):
24 def handler(*args):
25 UpdateHTTPRequestHandler(catalog_dir, *args)
26 httpd = BaseHTTPServer.HTTPServer((bind, port), handler)
27 sa = httpd.socket.getsockname()
28 logger.info('http server starting {0}:{1} {2}'.format(sa[0], sa[1], catalog_dir))
29 try:
30 httpd.serve_forever()
31 except KeyboardInterrupt:
32 logger.info('Shutting down...')
33 httpd.socket.close()
34
35
36class UpdateHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):

Callers 1

runFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected