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

Class UpdateHttpServer

src/updateserver/python3/updateserver.py:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

runFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected